Forums / Setup & design / Trouble with SSL + Login Redirection URI

Trouble with SSL + Login Redirection URI

Author Message

Pascal France

Thursday 20 December 2007 5:14:40 pm

Hi,

I've set login redirection for private accesses on my site.
I didn't defined specific siteaccess for the users who access these private parts.
To achieve redirection I set these lines in the site.ini.append.php file of my public siteaccess:

[UserSettings]
RegistrationEmail=
LogoutRedirect=/
LoginRedirectionUriAttribute[group]=redirection_uri

Then I've added a Text line datatype (ID = redirection_uri) to the user_group class.
At the end, I filled in the "Redirection URI" field of my User Groups.
And all the redirections work perfectely.

But since I've set the SSl zones, I've some redirection troubles.
In settings/override/site.ini.append.php I've added:

[SiteSettings]
DefaultAccess=xxxx
SiteList[]=xxx
SSLPort=443

[SSLZoneSettings]
SSLZones=enabled
ModuleViewAccessMode[user/login]=ssl
ModuleViewAccessMode[content/*]=keep

And here is the entire part of the ezp+ssl configuration of my apache2.conf:

SSLProtocol +TLSv1 +SSLv3
SSLCACertificateFile "/usr/lib/ssl/AC_cfdt/private/AC_cfdt.crt"
SSLCertificateFile "/usr/lib/ssl/AC_cfdt/certs/server_signed.pem"
SSLCertificateKeyFile "/usr/lib/ssl/AC_cfdt/private/server_tls.pem"

<VirtualHost 88.191.30.14:443>

    ServerName "www.mysite.fr"
    DocumentRoot /usr/local/www
    SSLEngine On
    DirectoryIndex index.php index.html

<Directory /usr/local/www>
    Options -Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
</Directory>

<IfModule mod_php4.c>
    php_admin_flag safe_mode Off
    php_admin_value register_globals    0
    php_value magic_quotes_gpc  0
    php_value magic_quotes_runtime  0
    php_value allow_call_time_pass_reference 0
</IfModule>

<IfModule mod_rewrite.c>
    RewriteEngine On
    Rewriterule ^/var/storage/.* - [L]
    Rewriterule ^/var/[^/]+/storage/.* - [L]
    RewriteRule ^/var/cache/texttoimage/.* - [L]
    RewriteRule ^/var/[^/]+/cache/texttoimage/.* - [L]
    Rewriterule ^/design/[^/]+/(stylesheets|images|javascript)/.* - [L]
    Rewriterule ^/share/icons/.* - [L]
    Rewriterule ^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]
    Rewriterule ^/packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
    RewriteRule ^/packages/styles/.+/thumbnail/.* - [L]
    RewriteRule ^/favicon.ico - [L]
    RewriteRule ^/robots.txt - [L]

    RewriteRule ^/phpMyAdmin_21122 - [L]
    RewriteRule ^/repTemporaire - [L]
    RewriteRule ^/* /index.php
</IfModule>

</VirtualHost>


NameVirtualHost 88.191.30.14:80
<VirtualHost 88.191.30.14:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /usr/local/www
        DirectoryIndex maintenance.txt index.php index.html.fr index.html.en index.html
        <Directory /usr/local/www>
                Options -Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        <IfModule mod_php4.c>
                php_admin_flag safe_mode Off
                php_admin_value register_globals    0
                php_value magic_quotes_gpc  0
                php_value magic_quotes_runtime  0
                php_value allow_call_time_pass_reference 0
        </IfModule>

        <IfModule mod_rewrite.c>
                RewriteEngine On
                Rewriterule ^/var/storage/.* - [L]
                Rewriterule ^/var/[^/]+/storage/.* - [L]
                RewriteRule ^/var/cache/texttoimage/.* - [L]
                RewriteRule ^/var/[^/]+/cache/texttoimage/.* - [L]
                Rewriterule ^/design/[^/]+/(stylesheets|images|javascript)/.* - [L]
                Rewriterule ^/share/icons/.* - [L]
                Rewriterule ^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]
                Rewriterule ^/packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
                RewriteRule ^/packages/styles/.+/thumbnail/.* - [L]
                RewriteRule ^/favicon.ico - [L]
                RewriteRule ^/robots.txt - [L]

                RewriteRule ^/phpMyAdmin_21122 - [L]
                RewriteRule ^/repTemporaire - [L]
                RewriteRule ^/* /index.php
        </IfModule>
        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined
        ServerSignature Off
    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>
    <Directory "/usr/local/www/phpMyAdmin_21122">
        Redirect / https://www.musite.fr/
    </Directory>
</VirtualHost>

The first trouble I've met is the https URI of the user login page which contains 2 consecutive slashes:

https://www.mysite.fr//user/login

I can't remove the second slash and I can't understand where does it come from.
The second problem is the content of the redirection page (the home page displayed once the user is logged in) which correspond no more with the page I set in the User Group. The URI of this page is the right one but contains 2 consecutive slashes too. Removing one has no effect after I reload the page.
In fact, it seems the user is not "really" (??) logged in: I mean the name of the user and the "Disconnect" link are no more displayed whereas they where without SSL and, moreover, the Homepage link has a very strange behavior:
- the first time I click on, I get about the half of the things the user should see
- and I have to click on it a second time to see the entire well page (with user name, "Disconnect" link, the right menus, and so on...)

However, with SSL I've absolutely no problem with the admin interface redirection page of the editors. Maybe this is due to I've created one siteaccess per editor and I don't use LoginRedirectionUriAttribute[group] for them...

Any help is wellcome

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

eZ debug

Timing: Jan 19 2025 03:30:10
Script start
Timing: Jan 19 2025 03:30:10
Module start 'content'
Timing: Jan 19 2025 03:30:11
Module end 'content'
Timing: Jan 19 2025 03:30:11
Script end

Main resources:

Total runtime1.0627 sec
Peak memory usage4,096.0000 KB
Database Queries183

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0128 589.0703180.8281
Module start 'content' 0.01280.8571 769.8984461.8047
Module end 'content' 0.86990.1927 1,231.7031338.0938
Script end 1.0626  1,569.7969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00480.4501210.0002
Check MTime0.00150.1452210.0001
Mysql Total
Database connection0.00230.215510.0023
Mysqli_queries0.974091.65181830.0053
Looping result0.00230.21961810.0000
Template Total1.023996.320.5119
Template load0.00240.228720.0012
Template processing1.021496.114020.5107
Template load and register function0.00020.023310.0002
states
state_id_array0.00100.089510.0010
state_identifier_array0.00210.195520.0010
Override
Cache load0.00200.1902260.0001
Sytem overhead
Fetch class attribute can translate value0.00190.179920.0010
Fetch class attribute name0.00160.151510.0016
XML
Image XML parsing0.00050.046820.0002
class_abstraction
Instantiating content class attribute0.00000.000710.0000
General
dbfile0.01040.9806210.0005
String conversion0.00000.000830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs