Forums / Setup & design / Undesired switching of user accounts

Undesired switching of user accounts

Author Message

Rikard Ahrgren

Thursday 08 January 2009 10:34:35 am

I'm not sure if this is the right place, so please bear with me.
I have a strange problem in which a user is logged in to another users account by simply accessing the same page as the another within a short period of time.

Consider the following scenario:
One user logs in and accesses a few pages and logs out. Then another user with exactly the same rights as the first user accesses the same page a couple of minutes later.
The second user will then have been switched to the first user's account, but not with the rights to edit the first user's personal information or objects. When the second user accesses another page which the first one haven't he is switched back to his original account, but as soon as he goes to a page the other user has accessed, he is logged back to that user.

Worth to mention is that it only works if the users are a member of the same groups. Two different user with different rights does not affect each other. It works no matter if it is from the same computer or two different, from different ip-addresses.

I cannot imagine this to be a general bug, but i have no idea why it does so on my site.. I'm quite new to ez publish. Please help me.

By the way, I'm using ez publish 3.9.0.

Kristof Coomans

Thursday 08 January 2009 10:50:10 pm

Hi Rikard

Does this concern pages that were cached by the content view caching system? See http://ez.no/developer/articles/ez_publish_performance_optimization_part_3_of_3_practical_cache_and_template_solutions/caching_overview. If you want to put user specific information into node views, then you need to disable content view caching.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

André R.

Friday 09 January 2009 4:11:15 am

ezwebin on eZ Publish 3.9.0 had a issue where it caches pagelayout header (using cache block) pr users with same rights, and not pr user. So your not logged in as another user, it's just another users user name that shows up on the webpage( so no security issue besides seeing the name of another user an his user id in the markup).

You can update ezwebin to 1.2 to get the fix, but you'll need to update eZ Publish as the updated uses nested cach-block's witch didn't work on 3.9.0 (fixed in a later 3.9.x version so use latest 3.9.x version or newer).

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Rikard Ahrgren

Friday 09 January 2009 4:35:47 am

Thank you very much for your help! Disabling templatecache in site.ini.append solved my problems

Regarding the issue in 3.9.0, it sounds exactly like the problem, but when I used
{def $current_user=fetch( 'user', 'current_user' ) } in a template file it also gave the wrong user. And if the user was trying to change personal settings while the wrong name was shown it stated that the apporiate rights was missing for that account.

André R.

Friday 09 January 2009 5:25:53 am

fetch current user issue, see Kristof's post.
No rights to edit: This is caused by the fact the user id is in the url, so if you get wrong name you also get wrong url.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

eZ debug

Timing: Jan 18 2025 19:18:59
Script start
Timing: Jan 18 2025 19:18:59
Module start 'content'
Timing: Jan 18 2025 19:18:59
Module end 'content'
Timing: Jan 18 2025 19:18:59
Script end

Main resources:

Total runtime0.1785 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0075 587.8281180.8281
Module start 'content' 0.00750.0060 768.656397.8984
Module end 'content' 0.01360.1648 866.5547527.3281
Script end 0.1784  1,393.8828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00392.1759200.0002
Check MTime0.00150.8656200.0001
Mysql Total
Database connection0.00110.642610.0011
Mysqli_queries0.131373.56641410.0009
Looping result0.00160.90931390.0000
Template Total0.164492.110.1644
Template load0.00100.543110.0010
Template processing0.163491.586310.1634
Override
Cache load0.00070.365310.0007
Sytem overhead
Fetch class attribute can translate value0.00070.396110.0007
XML
Image XML parsing0.00030.159610.0003
General
dbfile0.00160.8959200.0001
String conversion0.00000.004030.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs