You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2021/03/09 16:15:46 UTC

svn commit: r1887382 - in /httpd/httpd/branches/2.4.x: ./ modules/session/mod_session_crypto.c

Author: ylavic
Date: Tue Mar  9 16:15:45 2021
New Revision: 1887382

URL: http://svn.apache.org/viewvc?rev=1887382&view=rev
Log:
Merge r1874674 from trunk:

bubble up an error if none of the passhrases work

previously, the un-decodable z->encoded would get set to NULL
but success would be returned


Submitted by: covener
Reviewed by: jailletc36, ylavic, covener

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/modules/session/mod_session_crypto.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1874674

Modified: httpd/httpd/branches/2.4.x/modules/session/mod_session_crypto.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/session/mod_session_crypto.c?rev=1887382&r1=1887381&r2=1887382&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/session/mod_session_crypto.c (original)
+++ httpd/httpd/branches/2.4.x/modules/session/mod_session_crypto.c Tue Mar  9 16:15:45 2021
@@ -391,6 +391,8 @@ static apr_status_t decrypt_string(reque
         return res;
     }
 
+    res = APR_ECRYPT; /* in case we exhaust all passphrases */
+
     /* try each passphrase in turn */
     for (; i < dconf->passphrases->nelts; i++) {
         const char *passphrase = APR_ARRAY_IDX(dconf->passphrases, i, char *);