@verb #7774:"authorise" this none this rxdo #55 @program #7774:"authorise" this none this "This verb is called by $login with the passwd typed from the login screen as argument." "If you mess with this verb and you don't have EHW access, you risk locking yourself out!" "Begin generic security check (authorise)" if (verb == "authorise" && caller != $perm_utils) raise(E_PERM, "Calls to authorise must be made through $perm_utils:authorise_user.") return E_PERM endif "End generic security check (authorise)" if (!caller:isa($connection) || !caller_perms().wizard) raise(E_PERM) endif trueP = this.password if (!trueP) return 1 endif pwstart = index(trueP, ":") + 1 givenP = $string_utils:lowercase(args[1]) if (pwstart == 1 && string_hash(givenP) == trueP) "Salt it!" try this.password = tostr(salt = random(), ":", string_hash(tostr(salt, ":", givenP))) except (ANY) this.password = trueP endtry return 1 elseif (trueP[pwstart..$] == string_hash(tostr(trueP[1..pwstart - 2], ":", givenP))) return 1 else return 0 "DENIED!" endif "Last modified by Lao-Tzu (#8084) on Mon Dec 17 13:56:28 2001 MST." .