makekey now uses createAuth() and shows a nice form.
This commit is contained in:
parent
ddd6149251
commit
660ea666d9
1 changed files with 8 additions and 7 deletions
|
@ -1,10 +1,11 @@
|
|||
|
||||
if ( checkAddress()==false ) return;
|
||||
if ( checkAuth()==false ) return;
|
||||
|
||||
if ( req.data.value!=null ) {
|
||||
res.write ( Packages.helma.util.MD5Encoder.encode(req.data.value) );
|
||||
} else {
|
||||
res.write ( '<html><head></head><body><form method=post action=makekey><input type=password name=value><input type=submit></form></body></html>' );
|
||||
// strictly limit access to localhost:
|
||||
if ( req.data.http_remotehost!="localhost" && req.data.http_remotehost!="127.0.0.1" ) {
|
||||
app.__app__.logEvent( req.data.http_remotehost + " tried to access makekey");
|
||||
return;
|
||||
}
|
||||
|
||||
if ( checkAuth()==false ) return;
|
||||
|
||||
createAuth();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue