[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] Digest Authentication not working when request URI is es

From: Andreas Wehrmann
Subject: [libmicrohttpd] Digest Authentication not working when request URI is escaped
Date: Tue, 26 May 2015 14:22:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0


I'm currently messing around with digest authentication and found a problem (latest SVN).

Digest authentication works fine iff the URI requested by the client is not escaped (i.e. contains no space or some other 'weird' character). If the request URI is escaped, the check in MHD_digest_auth_check() @ digestauth.c:675 fails:

0 != strncmp (uri, connection->url, strlen (connection->url))

giving me the error message: "Authentication failed, URI does not match".

I've added a log statement to output 'uri' and 'connection->url' right after the check:
printf( "%s: URI( %s ) CNX( %s )\n", __FUNCTION__, uri, connection->url );

The result ist:

MHD_digest_auth_check: URI( /eins%20zwo/test.html ) CNX( /eins zwo/test.html )

Best regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]