Project

General

Profile

Anomalie #1991

redirection en boucle sur eole-web

Added by Emmanuel GARETTE (2) almost 12 years ago. Updated over 11 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
-
Category:
-
Start date:
08/25/2011
Due date:
% Done:

100%

Spent time:
Distribution:
EOLE 2.3

Description

La valeur de web_redirection est à "/" par défaut :

            <variable name='web_redirection' type='string' description='Application web par défaut (redirection)' >
                <value>/</value>
            </variable>

Dans le template nous avons :

%if %%is_defined('activer_envole') and %%activer_envole == 'oui'
 RewriteRule ^/$ %%alias_envole [R=permanent]
%else
 RewriteRule ^/$ %%web_redirection [R=permanent]
%end if

Ce qui signifie que la ligne sera :
RewriteRule ^/$ / [R=permanent]

(si on demande / on renvoi vers ... /).

Il faudrait faire un test pour éviter la redirection en boucle :

-- Vhost.conf.old  2011-08-25 08:49:32.533349685 +0200
+++ Vhost.conf  2011-08-25 08:54:58.433022085 +0200
@@ -7,8 +7,12 @@
  ErrorLog /var/log/apache2/error.log
  RewriteEngine On
 %if %%is_defined('activer_envole') and %%activer_envole == 'oui'
+ %if %%alias_envole != '/'
  RewriteRule ^/$ %%alias_envole [R=permanent]
+ %end if
 %else
+ %if %%web_redirection != '/'
  RewriteRule ^/$ %%web_redirection [R=permanent]
+ %end if
 %end if
 </VirtualHost>
--- Vhost-ssl.conf.old  2011-08-25 08:50:23.000750923 +0200
+++ Vhost-ssl.conf  2011-08-25 08:53:46.867051833 +0200
@@ -12,9 +12,13 @@
  ServerName %%nom_machine
  RewriteEngine On
 %if %%is_defined('activer_envole') and %%activer_envole == 'oui'
+ %if %%alias_envole != '/'
  RewriteRule ^/$ %%alias_envole [R=permanent]
+ %end if
 %else
+ %if %%web_redirection != '/'
  RewriteRule ^/$ %%web_redirection [R=permanent]
+ %end if
 %end if
 #  <Location />
 #    Order Allow,Deny

De plus, je ne comprends pas bien pourquoi le template est si compliqué. alias_envole et web_redirection sont les mêmes variables. Pourquoi ne pas jouer avec les redefines ?

Associated revisions

Revision 55b10b74 (diff)
Added by Walid Nouh over 13 years ago

see #1991 Add new ldap fields

Revision 81c7abc1 (diff)
Added by Walid Nouh over 13 years ago

see #1991 : add import_externalauth_users right

Revision 3546b388 (diff)
Added by Walid Nouh over 13 years ago

see #1991 First work on ldap user import from ticket form

Revision 06036f3a (diff)
Added by Walid Nouh over 13 years ago

see #1991 Fix ldap search issues

Revision 92e529ba (diff)
Added by Walid Nouh over 13 years ago

see #1991 Fix ldap import

Revision 60ab0319 (diff)
Added by Walid Nouh over 13 years ago

see #1991 Add missing file and new checks for popup

Revision 47738572 (diff)
Added by Walid Nouh over 13 years ago

see #1991 Display criterias 2 per line (like autoreport)

Revision 3c46d802 (diff)
Added by Walid Nouh over 13 years ago

see #1991 Fix basedn retrieval

Revision 75bb4b94 (diff)
Added by Walid Nouh over 13 years ago

see #1991 Improvements + correct ldapImportUSerByServerId call

Revision 6c815764 (diff)
Added by Walid Nouh over 13 years ago

see #1991 Add interface expert mode

Revision bc7763fd (diff)
Added by Walid Nouh over 13 years ago

see #1991 Improve ldap link

Revision 357225b7 (diff)
Added by Walid Nouh over 13 years ago

see #1991 Improve last commit

Revision 3a4355e5 (diff)
Added by Walid Nouh over 13 years ago

see #1991 Look for user with phone and email in user dropdown

Revision 181097af (diff)
Added by Walid Nouh over 13 years ago

see #1991 Improve search GUI

Revision 5a00db93 (diff)
Added by Walid Nouh over 13 years ago

see #1991 Improve GUI

Revision 6fc5c7b8 (diff)
Added by Walid Nouh over 13 years ago

see #1991 Use session to store data instead of $_REQUEST

Revision ec745515 (diff)
Added by Walid Nouh over 13 years ago

see #1991 Improve previous commit

Revision 42cfa259 (diff)
Added by Walid Nouh over 13 years ago

see #1991 Fix basedn search criteria

Revision 866cd031 (diff)
Added by Walid Nouh over 13 years ago

see #1991 Remove addldapuser.php page

Revision 7f691a07 (diff)
Added by Walid Nouh over 13 years ago

see #1991 Add basedn option when searching in expert mode + clean code

Revision 951d3ef4 (diff)
Added by Walid Nouh over 13 years ago

see #1991 Fix bugs + add is_default to glpi_authldaps

Revision e74e3feb (diff)
Added by Walid Nouh over 13 years ago

see #1991 Fix right issues

Revision 78d90dd8 (diff)
Added by Joël Cuissinat over 11 years ago

prise en compte du risque de redirection web en boucle (fixes #1991)

History

#1 Updated by Joël Cuissinat over 11 years ago

  • Target version set to Mises à jour 2.3 - 02 RC

#2 Updated by Joël Cuissinat over 11 years ago

  • Status changed from Nouveau to Résolu
  • % Done changed from 0 to 100

#3 Updated by Joël Cuissinat over 11 years ago

  • Status changed from Résolu to Fermé
  • Distribution set to EOLE 2.3
root@horusng:~# echo $web_redirection
/
root@horusng:~# grep RewriteRule /usr/share/eole/creole/distrib/Vhost*.conf
/usr/share/eole/creole/distrib/Vhost.conf: RewriteRule ^/$ %%alias_envole [R=permanent]
/usr/share/eole/creole/distrib/Vhost.conf: RewriteRule ^/$ %%web_redirection [R=permanent]
/usr/share/eole/creole/distrib/Vhost-ssl.conf: RewriteRule ^/$ %%alias_envole [R=permanent]
/usr/share/eole/creole/distrib/Vhost-ssl.conf: RewriteRule ^/$ %%web_redirection [R=permanent]
root@horusng:~# grep RewriteRule /etc/apache2/sites-enabled/Vhost*.conf
root@horusng:~#

Also available in: Atom PDF