% unless(defined($valsi)) { I can't very well add a valsi if you don't tell me what to add! % return; % } % unless(defined($session{'username'})) { I'm not going to let you add a valsi unless you log in. % return; % } % unless(defined($confirm)) { Adding valsi "<% $valsi %>"
Sorry, that isn't actually a word in Lojban.
(Did you remember to strip leading and/or trailing pauses?)
% return; % }So. You want to add a valsi to the database.
This shouldn't be done lightly. Please check the following:
I've automatically checked the valsi myself, and have decided that it is of type: <% $typestr %>. If this is correct, and you are very sure that you want to add this word, pick a language and then hit the button below:
<%perl> } else { $m->redirect( $valsi ); } } else { my $typestr = utils::vlatai($valsi); unless(produce_verifier($valsi.$typestr) eq $confirm) { %perl>Uhoh. You're really trying to get sneaky on me. We can't have that.
Convinently (for me, anyways), to even get to this point, you would've had to provide a cookie. Since they're rather well encrypted, I know you didn't send me a fake one, <% $session{'username'} %>. I'm afraid Robin is going to have to have a very, very long talk with you.
% return; % } It should no longer be possible to get here. If you got here, please mail lojban@lojban.org with how you did it. % } <%init> our($dbh,%session); sub produce_verifier { my $valsi = shift; my $verifier = md5_hex(pack("f*",map { ord } (split//, $valsi))); return $verifier; } %init> <%args> $valsi => undef $confirm => undef %args>