Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drupal's bootstrap overrides SimpleSamlPHP's exception handler #29

Open
manarth opened this issue Jul 26, 2016 · 1 comment
Open

Drupal's bootstrap overrides SimpleSamlPHP's exception handler #29

manarth opened this issue Jul 26, 2016 · 1 comment
Labels

Comments

@manarth
Copy link

manarth commented Jul 26, 2016

When drupal_bootstrap() is invoked, Drupal's exception handler (_drupal_exception_handler()) replaces SimpleSamlPHP's exception handler (SimpleSAML_exception_handler()).

  • When an invalid SSO request is received, SimpleSamlPHP throws an Exception.
  • This is caught by Drupal's Exception handler, which attempts to generate a Drupal error page.
  • The error page invokes Drupal's theme layer.
  • If aggregate-css or aggregate-js is turned on, Drupal attempts to build the CSS/JS caches.
  • The cache-generation attempts to call file_get_contents() on the relevant CSS/JS files.
  • The file_get_contents() calls fail, because the current working directory is the SimpleSamlPHP service, not the Drupal docroot.
  • This triggers multiple watchdog() calls to record the error.

The effect is multiple watchdog entries with messages such as

Warning: file_get_contents(misc/jquery.once.js): failed to open stream: No such file or directory in drupal_build_js_cache() (line 5049 of /var/www/includes/common.inc).

@ralphvandenhoudt
Copy link

I have a same issue on D10 using drupalauth. I ignored it using this Drupal core patch but that is not the solution to solve the issue.
simplesaml-error-reporting.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants