mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Applied patch from hanke@rzg.mpg.de regarding web server authentication
This commit is contained in:
parent
2c4f838320
commit
569ab71cf0
10
src/elogd.c
10
src/elogd.c
@ -13203,13 +13203,13 @@ int save_user_config(LOGBOOK * lbs, char *user, BOOL new_user)
|
|||||||
|
|
||||||
/* if we outsourced the authentication, use external username */
|
/* if we outsourced the authentication, use external username */
|
||||||
getcfg(lbs->name, "Authentication", str, sizeof(str));
|
getcfg(lbs->name, "Authentication", str, sizeof(str));
|
||||||
if ( stristr(str, "Webserver")) {
|
if (stristr(str, "Webserver")) {
|
||||||
strlcpy(user, http_user, sizeof(user));
|
/* 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 */
|
/* check for user name */
|
||||||
if (!isparam("new_user_name") || *getparam("new_user_name") == 0) {
|
if (!isparam("new_user_name") || *getparam("new_user_name") == 0) {
|
||||||
sprintf(str, loc("Please enter \"%s\""), loc("Login name"));
|
sprintf(str, loc("Please enter \"%s\""), loc("Login name"));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user