Given:

  • ldap_sso module
  • Anonymous users don't have permissions on nodes, and see a custom access denied page. (Set in the site_403 variable).
  • page cache is enabled

Current Result:

the user will be redirected to 'access-denied' url when they logged in. This is because in _drupal_bootstrap_page_cache() the $_GET['q'] is changed to the cached one ($_GET['q'] = $cache->data['path'];).
The cached path is access-denied, because drupal_deliver_html_page changes the path to the access denied path when rendering the page.

Desired Result: ?

Comments

johnbarclay’s picture

Title: SSO redirects to access denied page after login » LDAP SSO: redirects to access denied page after login
Issue summary: View changes
zanymonster’s picture

I am having this issue as well. Not a developer, so the routines posted above makes no sense to me. What is very interesting/annoying to me though is that even though I meet two of the three conditions (ldap_sso module, Anonymous users don't have permissions on nodes and see a custom access denied page) but in my case, i have the issue whether or not page cache is enabled. This is not an issue for all users on all computers in my environment. Is there any workaround for us? I have an intranet site which does not allow access to the home page to anonymous users. Usually, the sso page (user/login/sso) logs users in and successfully redirects them to the home page. Inexplicably (to me anyway), sometimes they get the access denied page instead of redirecting. When that happens, the log shows the logged in user was denied access to user/login/sso.

zanymonster’s picture

My problem ended up being resolved by adding the site to the Intranet Zone on IE11.

grahl’s picture

Status: Active » Postponed (maintainer needs more info)

If I understand you correctly, your users are hitting a node and getting a 403 and there is a login block on that page, when they use that, the post-login redirect destination is the 403 page? Off the top of my hat I'd probably force redirection to the login page with a fixed destination parameter to solve this.

Did you resolve this with a workaround?

grahl’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

No feedback for more than 2 months, closing.