Applied patch form JJK to fix user creation under Webserver authentication
This commit is contained in:
+3
-1
@@ -13273,7 +13273,7 @@ int save_user_config(LOGBOOK *lbs, char *user, BOOL new_user) {
|
||||
|
||||
/* if we outsourced the authentication, use external username */
|
||||
getcfg(lbs->name, "Authentication", str, sizeof(str));
|
||||
if (stristr(str, "Webserver")) {
|
||||
if (!is_admin_user(lbs, http_user) && stristr(str, "Webserver")) {
|
||||
/* do not allow HTML in user name */
|
||||
strencode2(user_enc, http_user, sizeof(user_enc));
|
||||
} else {
|
||||
@@ -26139,6 +26139,8 @@ BOOL is_admin_user(LOGBOOK *lbs, char *user) {
|
||||
}
|
||||
|
||||
/* make sure user is logged in */
|
||||
if (strcmp(user, http_user) == 0)
|
||||
return TRUE;
|
||||
if (lbs && !logged_in(lbs))
|
||||
return FALSE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user