mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 01:49:08 +01:00
LSurl: Remove REQUESTED_URL parameter and always detecting URL from REQUEST_URI
This permit to correctly handle object's DN with slashes (with AllowEncodedSlashes NoDecode).
This commit is contained in:
parent
0ce63f3d1e
commit
06852080a8
3 changed files with 7 additions and 19 deletions
3
debian/conf/apache.conf
vendored
3
debian/conf/apache.conf
vendored
|
@ -8,3 +8,6 @@ Alias /ldapsaisie /usr/share/ldapsaisie/public_html
|
|||
Options -Indexes +FollowSymLinks
|
||||
AllowOverride FileInfo
|
||||
</Directory>
|
||||
|
||||
# Uncomment if you have LDAP object DN with slashes
|
||||
#AllowEncodedSlashes NoDecode
|
||||
|
|
|
@ -54,9 +54,6 @@ class LSurl extends LSlog_staticLoggerClass {
|
|||
*/
|
||||
private static $patterns = array();
|
||||
|
||||
// Rewrited request param
|
||||
const REWRITED_REQUEST_PARAM = 'REQUESTED_URL';
|
||||
|
||||
/**
|
||||
* Add an URL pattern
|
||||
*
|
||||
|
@ -161,18 +158,6 @@ class LSurl extends LSlog_staticLoggerClass {
|
|||
return False;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current requested URL
|
||||
*
|
||||
* @retval string The current requested URL
|
||||
**/
|
||||
public static function get_current_url() {
|
||||
if (array_key_exists(self :: REWRITED_REQUEST_PARAM, $_REQUEST))
|
||||
return $_REQUEST[self :: REWRITED_REQUEST_PARAM];
|
||||
self :: log_warning('LSurl : Rewrite request param not present, try to detect current URL.');
|
||||
return self :: detect_current_url();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the public absolute URL
|
||||
*
|
||||
|
@ -283,15 +268,15 @@ class LSurl extends LSlog_staticLoggerClass {
|
|||
}
|
||||
|
||||
/**
|
||||
* Helpers to detect current requested URL
|
||||
* Helpers to retreive current requested URL
|
||||
*/
|
||||
|
||||
/*
|
||||
* Try to detect current requested URL
|
||||
* Try to detect current requested URL and return it
|
||||
*
|
||||
* @retval string|false The current request URL or false if detection fail
|
||||
**/
|
||||
private static function detect_current_url() {
|
||||
private static function get_current_url() {
|
||||
self :: log_debug("URL : request URI = '".$_SERVER['REQUEST_URI']."'");
|
||||
|
||||
$base = self :: get_rewrite_base();
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
RewriteEngine On
|
||||
RewriteRule ^(.*)$ index.php?REQUESTED_URL=$1 [L,QSA]
|
||||
RewriteRule ^ index.php [L]
|
||||
|
|
Loading…
Reference in a new issue