summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlib/rddb.pm2
-rwxr-xr-xlistdrobpoxes.cgi8
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/rddb.pm b/lib/rddb.pm
index 226c415..7a885be 100755
--- a/lib/rddb.pm
+++ b/lib/rddb.pm
@@ -68,7 +68,7 @@ sub check_token
return (undef, 'ERROR', "user '" . $username . "' not known by rivendell")
}
- if($token_result == $token) {
+ if($token_result eq $token) {
return (1, 'OK', 'success');
}
return (0, 'ERROR', "wrong password");
diff --git a/listdrobpoxes.cgi b/listdrobpoxes.cgi
index 4f7050a..772159a 100755
--- a/listdrobpoxes.cgi
+++ b/listdrobpoxes.cgi
@@ -9,13 +9,13 @@ my $status = 'ERROR';
my $errorstring = 'unknown';
my $responsecode = 500;
-my $username = '';
-my $token = '';
-
+my $username = 'heslinki';
+my $token = 'asdlkfjlkdsf';
my $dbh;
-$dbh, $status, $errorstring) = rddb::opendb();
+($dbh, $status, $errorstring) = rddb::opendb();
if(defined $dbh) {
+ my $result;
($result, $status, $errorstring) = rddb::check_token($dbh, $username, $token);
if($result == 1) {
$responsecode = 200;