Applied patch from hanke@rzg.mpg.de regarding web server authentication

This commit is contained in:
2015-06-09 15:44:27 +02:00
parent 2c4f838320
commit 569ab71cf0
+5 -5
View File
@@ -13203,13 +13203,13 @@ 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")) {
strlcpy(user, http_user, sizeof(user));
if (stristr(str, "Webserver")) {
/* do not allow HTML in user name */
strencode2(user_enc, http_user, sizeof(user_enc));
} else {
strencode2(user_enc, user, sizeof(user_enc));
}
/* do not allow HTML in user name */
strencode2(user_enc, user, sizeof(user_enc));
/* check for user name */
if (!isparam("new_user_name") || *getparam("new_user_name") == 0) {
sprintf(str, loc("Please enter \"%s\""), loc("Login name"));