Password protected backup restore to luci2 and web gui.

This commit is contained in:
Martin Schröder 2015-04-16 13:24:48 +02:00 committed by Martin Schröder
parent b1e6205ecd
commit 4dbc59cb2e

View file

@ -618,9 +618,9 @@ main_backup(int argc, char **argv)
char buf[4096];*/ char buf[4096];*/
char datestr[16] = { 0 }; char datestr[16] = { 0 };
char hostname[64] = { 0 }; char hostname[64] = { 0 };
char *fields[] = { "sessionid", NULL, "password", NULL }; char *fields[] = { "sessionid", NULL };
if (!postdecode(fields, 2) || !session_access(fields[1], "backup", "read")) if (!postdecode(fields, 1) || !session_access(fields[1], "backup", "read"))
return failure(0, "Backup permission denied"); return failure(0, "Backup permission denied");
now = time(NULL); now = time(NULL);