diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rwxr-xr-x | configure | 7 | ||||
-rw-r--r-- | lib/JWebmail/Controller/Webmail.pm | 10 |
3 files changed, 6 insertions, 12 deletions
@@ -13,6 +13,7 @@ __pycache__/ node_modules/ public/ buildmachine/ +.#buildmachine.lck build.ninja .ninja_deps .ninja_log @@ -40,13 +40,6 @@ check_ninja_version () { rm "$ninja_file" } -detect_languages () { - cd lib/JWebmail/I18N - for l in * - do echo "${l%.pm}" - done -} - allargs="$*" while getopts 'c:e:hm:n:r:u:' opt do case $opt in diff --git a/lib/JWebmail/Controller/Webmail.pm b/lib/JWebmail/Controller/Webmail.pm index 94df668..7bf083a 100644 --- a/lib/JWebmail/Controller/Webmail.pm +++ b/lib/JWebmail/Controller/Webmail.pm @@ -347,7 +347,7 @@ sub _session_passwd { if ($secAlg eq fc 'cram_md5') { $self->session(S_PASSWD() => $passwd, challenge => $challenge); } - elsif ($secAlg eq 's3d') { + elsif ($secAlg eq fc 'plain') { unless ($passwd) { $self->s3d(S_PASSWD, ''); delete $self->session->{S_OTP_S3D_PW()}; @@ -363,7 +363,7 @@ sub _session_passwd { $self->session(S_OTP_S3D_PW, b64_encode($rand_bytes, '')); } else { - $self->session(S_PASSWD() => $passwd); + die } } else { # get @@ -371,14 +371,14 @@ sub _session_passwd { wantarray or carp "you forgot the challenge"; return ($self->session(S_PASSWD), $self->session('challenge')); } - elsif ($secAlg eq 's3d') { + elsif ($secAlg eq fc 'plain') { my $pw = b64_decode($self->s3d(S_PASSWD) || ''); my $otp = b64_decode($self->session(S_OTP_S3D_PW) || ''); my ($res) = split "\n", decode('UTF-8', $pw ^ $otp), 2; return $res; } else { - return $self->session(S_PASSWD); + die } } } @@ -388,7 +388,7 @@ sub _warn_crypt { state $once = 0; - if ( !TRUE_RANDOM && !$once && lc $self->config->{session}{secure} eq 's3d' ) { + if ( !TRUE_RANDOM && !$once && LOGIN_SCHEME eq fc 'plain' ) { $self->log->warn("Falling back to pseudo random generation. Please install Crypt::URandom"); $once = 1; } |