[99s-extend] HTTP Basic Auth base64 decode fails

Paulo F. Oliveira paulo.ferraz.oliveira at gmail.com
Tue Jul 8 15:17:32 CEST 2014


Hello, y'all.

I'm using HTTP Basic Auth in my API. While calling
cowboy_req:parse_header(<<"authorization>>", ... with an _invalid_
Authorization header such as "Authorization: Basic Test1" I get an error
500 back and an error log message on the server.

1. Is this the expected behavior? [if I understand correctly, my request is
going through authorization(UserPass, Type = <<"basic">>) and this has no
check for the string being correctly encoded]

2. what would be the best way to guard against this "error"?

Thanks.

- Paulo F. Oliveira
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ninenines.eu/archives/extend/attachments/20140708/35d8806d/attachment.html>


More information about the Extend mailing list