Follow this steps to reproduce, everything with the same browser to share the session:
- Create and configure a Facebook App
- Enable fb_user and enable the automatic creation of an account
- Login with a facebook use
- Access your Canvas app (it will create a user account) and a session.
- Logout from facebook
- Login to Facebook with another user
- Access to your Canvas app again

As long as a session is created for the first user, it is not destroyed before the second user access and it will finish with the new user using the same uid and session than the first one.

The reason is because _fb_user_check_session is never called, so I've appended a patch to fix this.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Cohen’s picture

Component: Code » Canvas Pages (iframe)
Status: Needs review » Needs work

The change you've made isn't right. That basically makes the FB_USER_VAR_CHECK_SESSION variable serve no purpose. You could instead check the "validate session" option on admin >> site building >> facebook apps >> user settings. That should do the same thing your code has done.

However it shouldn't be needed. The code should automatically start a new session. Have you modified your settings.php to include fb_settings/php? Does your app have the signed request migration enabled.

jherencia’s picture

Category: bug » support

Ok, you are right, I miss understood what that part of the code does.

I have modified settings.php but don't know where to enable the signed request migration option in my app.

Dave Cohen’s picture

On facebook. Start at admin/build/fb, click the number under "remote settings". Then click "advanced". Signed request is still one of the ever-changing list of "migrations".

james.williams’s picture

Since this is a security issue (being able to take control of others' accounts), should the 'validate session' option not default to being on rather than off?

I'm not seeing the signed request migration option in my app, was this one of the ones that FB is now enforcing?

jherencia’s picture

I don't see that option either.