X-Git-Url: https://code.th-h.de/?p=usenet%2FINN.git;a=blobdiff_plain;f=auth%2Fperl_mysql;h=dc963ec36387803af0017e8a048c3314ff422977;hp=5f70039009de36d9a4d165faf6a6022dae698aca;hb=refs%2Fheads%2Fmaster;hpb=d4dd9a5895aa5090b2eb169dc0b6c12c902f6980 diff --git a/auth/perl_mysql b/auth/perl_mysql index 5f70039..dc963ec 100644 --- a/auth/perl_mysql +++ b/auth/perl_mysql @@ -56,6 +56,11 @@ sub authenticate() { # $attributes{username} username # $attributes{password} password + # return if username or password not set + if (!defined($attributes{username}) or !defined($attributes{password})) { + return (481, 'Authentication failure'); + } + ### DB init my $dbs = sprintf('DBI:%s:database=%s;host=%s',$conf{'dbdriver'},$conf{'database'},$conf{'dbhost'}); my $dbhandle = DBI->connect($dbs, $conf{'dbuser'}, $conf{'dbpw'}, { PrintError => 1 });