Commit 67a8fda46e055c074615e77652c214e15603a0fd
1 parent
87b7eb4f
Placed a check around the workaround for mod_auth on php cgi.
Committed by: Megan Watson
Showing
1 changed file
with
4 additions
and
1 deletions
rss.php
| ... | ... | @@ -41,9 +41,12 @@ require_once(KT_LIB_DIR .'/authentication/authenticationutil.inc.php'); |
| 41 | 41 | require_once(KT_DIR. '/plugins/rssplugin/KTrss.inc.php'); |
| 42 | 42 | |
| 43 | 43 | // Workaround for mod_auth when running php cgi |
| 44 | -list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':' , base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6))); | |
| 44 | +if(!isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['HTTP_AUTHORIZATION'])){ | |
| 45 | + list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':' , base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6))); | |
| 46 | +} | |
| 45 | 47 | |
| 46 | 48 | // workaround to get http authentication working in cgi mode |
| 49 | +// * older workaround - doesn't seem to be working now * | |
| 47 | 50 | $altinfo = KTUtil::arrayGet( $_SERVER, 'kt_auth', KTUtil::arrayGet( $_SERVER, 'REDIRECT_kt_auth')); |
| 48 | 51 | if ( !empty( $altinfo) && !isset( $_SERVER['PHP_AUTH_USER'])) { |
| 49 | 52 | $val = $altinfo; | ... | ... |