mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-02-10 18:49:14 +00:00
![Nigel Kukard](/assets/img/avatar_default.png)
Currently passing an invalid Basic auth header (random string base64 encoded) would result in an exception being raised due to a `username, password = auth_header.split()`. I refactored the code in this decorator by checking explicitly that we are doing basic authentication then by checking the number of entries returned by the split. I also added exception handling for invalid UTF-8 code sequences. Tested with a fuzzer. Tested with valid and invalid credentials. This fixes #1447.