[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 11/14: digestauth: fixed username extraction with the ne
From: |
gnunet |
Subject: |
[libmicrohttpd] 11/14: digestauth: fixed username extraction with the new API |
Date: |
Thu, 21 Jul 2022 14:08:09 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 57a5fcfac7b83c771d11d8c46d6d010d86e526a4
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Thu Jul 21 13:12:46 2022 +0300
digestauth: fixed username extraction with the new API
---
src/microhttpd/digestauth.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c
index 46c47eda..88a9cdbd 100644
--- a/src/microhttpd/digestauth.c
+++ b/src/microhttpd/digestauth.c
@@ -892,9 +892,12 @@ get_rq_uname (const struct MHD_RqDAuth *params,
else
{
uname_info->userhash_bin = (uint8_t *) (buf + buf_used);
+ uname_info->uname_type = MHD_DIGEST_AUTH_UNAME_TYPE_USERHASH;
buf_used += uname_info->userhash_bin_size;
}
}
+ else
+ uname_info->uname_type = MHD_DIGEST_AUTH_UNAME_TYPE_STANDARD;
}
else if (MHD_DIGEST_AUTH_UNAME_TYPE_EXTENDED == uname_type)
{
@@ -909,9 +912,15 @@ get_rq_uname (const struct MHD_RqDAuth *params,
{
uname_info->username = (char *) (buf + buf_used);
uname_info->username_len = (size_t) res;
+ uname_info->uname_type = MHD_DIGEST_AUTH_UNAME_TYPE_EXTENDED;
buf_used += uname_info->username_len + 1;
}
}
+ else
+ {
+ mhd_assert (0);
+ uname_info->uname_type = MHD_DIGEST_AUTH_UNAME_TYPE_INVALID;
+ }
mhd_assert (buf_size >= buf_used);
return buf_used;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] branch master updated (bd88a19e -> 22796735), gnunet, 2022/07/21
- [libmicrohttpd] 01/14: test_basicauth: Fixed doxy, gnunet, 2022/07/21
- [libmicrohttpd] 02/14: test_digest: improved test URI, gnunet, 2022/07/21
- [libmicrohttpd] 04/14: digestauth: simplified internal function call, gnunet, 2022/07/21
- [libmicrohttpd] 03/14: digestauth: added small helper function to simplify the code, gnunet, 2022/07/21
- [libmicrohttpd] 06/14: digest_auth_check(): removed one more large local variable, gnunet, 2022/07/21
- [libmicrohttpd] 07/14: digest calculations: further simplified code, removed some local variables, gnunet, 2022/07/21
- [libmicrohttpd] 08/14: digestauth: removed usage of variable-length arrays, gnunet, 2022/07/21
- [libmicrohttpd] 11/14: digestauth: fixed username extraction with the new API,
gnunet <=
- [libmicrohttpd] 10/14: digest_auth_check(): updated the order of parameters check, gnunet, 2022/07/21
- [libmicrohttpd] 12/14: digestauth: do not allocate extra space for extended notation, gnunet, 2022/07/21
- [libmicrohttpd] 05/14: digestauth: added sanity check for digest macros, gnunet, 2022/07/21
- [libmicrohttpd] 09/14: digest_auth_check(): added support for username in extended notation, gnunet, 2022/07/21
- [libmicrohttpd] 13/14: digestauth: added support for extended notation for old API, gnunet, 2022/07/21
- [libmicrohttpd] 14/14: Added test for Digest Auth with username in extended notation, gnunet, 2022/07/21