mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
Password protected backup restore to luci2 and web gui.
This commit is contained in:
parent
b1e6205ecd
commit
4dbc59cb2e
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue