Don't let unprivileged users repair paths
This commit is contained in:
parent
7106bb0611
commit
d8ddf994e7
1 changed files with 9 additions and 7 deletions
|
@ -523,6 +523,8 @@ static void performOp(bool trusted, unsigned int clientVersion,
|
||||||
bool checkContents = readInt(from) != 0;
|
bool checkContents = readInt(from) != 0;
|
||||||
bool repair = readInt(from) != 0;
|
bool repair = readInt(from) != 0;
|
||||||
startWork();
|
startWork();
|
||||||
|
if (repair && !trusted)
|
||||||
|
throw Error("you are not privileged to repair paths");
|
||||||
bool errors = store->verifyStore(checkContents, repair);
|
bool errors = store->verifyStore(checkContents, repair);
|
||||||
stopWork();
|
stopWork();
|
||||||
writeInt(errors, to);
|
writeInt(errors, to);
|
||||||
|
|
Loading…
Reference in a new issue