summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/VNDB/Util/Auth.pm2
-rw-r--r--lib/VNDB/Util/LayoutHTML.pm3
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/VNDB/Util/Auth.pm b/lib/VNDB/Util/Auth.pm
index d6a35d1d..a1c6cf08 100644
--- a/lib/VNDB/Util/Auth.pm
+++ b/lib/VNDB/Util/Auth.pm
@@ -200,7 +200,7 @@ sub authGetCode {
# form-id is not given, the path of the current requests is used.
sub authCheckCode {
my $self = shift;
- my $id = shift || '/'.$self->reqPath();
+ my $id = shift || $self->reqPath();
my $code = shift || $self->reqParam('formcode');
return _incorrectcode($self) if !$code || $code !~ qr/^[0-9a-f]{16}$/;
my $time = time;
diff --git a/lib/VNDB/Util/LayoutHTML.pm b/lib/VNDB/Util/LayoutHTML.pm
index 5bd55873..e041960a 100644
--- a/lib/VNDB/Util/LayoutHTML.pm
+++ b/lib/VNDB/Util/LayoutHTML.pm
@@ -115,8 +115,7 @@ sub _menu {
} else {
h2 mt '_menu_user';
div;
- # XXX: Using %ENV here is ugly, this should be abstracted in TUWF.
- my $ref = uri_escape '/'.$self->reqPath().($ENV{QUERY_STRING} ? '?'.decode_utf8($ENV{QUERY_STRING}) : '');
+ my $ref = uri_escape $self->reqPath().$self->reqQuery();
a href => "/u/login?ref=$ref", mt '_menu_login'; br;
a href => '/u/newpass', mt '_menu_newpass'; br;
a href => '/u/register', mt '_menu_register'; br;