Skip to content
Snippets Groups Projects
  1. Mar 30, 2017
  2. Jan 16, 2017
  3. Aug 22, 2016
    • Jaime Pérez's avatar
      bugfix: Do not try to apply SSP's base URL if REQUEST_URI does not match. · 2155d1ec
      Jaime Pérez authored
      It is possible that the current script ($_SERVER['SCRIPT_FILENAME']) is inside SimpleSAMLphp's 'www' directory. However, even if that's the case, we should not enforce our base URL (as set in the 'baseurlpath' configuration option) if the request URI ($_SERVER['REQUEST_URI']) does not contain the relative path to the script. This is the case of AuthMemCookie, for example, where accessing a random URL protected by Apache, leads to the execution of a SimpleSAMLphp script, where SimpleSAML\Utils\HTTP::getSelfURL() must not try to be smart when guessing the current URL.
      2155d1ec
  4. Jul 15, 2016
    • Jaime Pérez's avatar
      bugfix: Restore the capability to get our self URL when invoked from a third-party script. · e8ee8c83
      Jaime Pérez authored
      Recent fixes for URL guessing and building addressed bugs in the code that were preventing the 'baseurlpath' from being used properly. However, they introduced a new issue, as the code was assuming the current URL would always point to a SimpleSAMLphp script. This is not always true, of course, as any script can invoke our API and end up trying to get its own URL (for example, when calling requireAuth()).
      
      In order to fix this, we monitor mismatches between SimpleSAMLphp's installation path and the absolute, real path to the current script. When there's a mismatch, it means we are running a third-party script outside SimpleSAMLphp, and therefore we should NOT enforce 'baseurlpath'. This introduces an additional issue, as applications behind a reverse proxy may cause trouble to guess the right URL (we will use the URL as seen by SimpleSAMLphp in the server, which is not necessarily the same as the user sees with a reverse proxy in between). For the moment, we'll leave the responsibility to sort that issue out to implementors. It might be a good idea to add a page to the wiki explaining how to do this.
      
      This resolves #418.
      e8ee8c83
  5. Jul 05, 2016
    • Jaime Pérez's avatar
      bugfix: Restore support for windows machines. · 93793d93
      Jaime Pérez authored
      Due to recent changes to fix the way we were building URLs (mixing what the 'baseurlpath' configuration option and the current URL, see #396), we introduced another bug by assuming file paths will always use slashes ('/'), which obviously is not true in Windows machines. This commit fixes SimpleSAML_Configuration::getBaseDir() and SimpleSAML\Utils\HTTP::getSelfURL() to take that into account.
      
      This closes #414.
      93793d93
  6. Jul 04, 2016
    • Jaime Pérez's avatar
      Enhance redirections and make them more resilient. · 3f2621e3
      Jaime Pérez authored
      Currently, if headers have already been sent, a redirection will fail and generate errors in the error log. The user will be presented with a page containing a link that he or she will need to click on. Checking if headers have already been sent we can avoid errors, and adding a simple javascript to the "onload" event in the body of the page, we can still redirect automatically. That way, only when headers have already been sent and the users have javascript disabled, they will get to see the page.
      3f2621e3
    • Jaime Pérez's avatar
      Start using the error codes in SimpleSAML\Error\CannotSetCookie. · f50f0297
      Jaime Pérez authored
      Both SimpleSAML_SessionHandlerPHP::setCookie() and SimpleSAML\Utils\HTTP::setCookie() throw the SimpleSAML\Error\CannotSetCookie exception. Depending on why the error was generated, set the error code in the exception accordingly.
      f50f0297
  7. Jul 02, 2016
  8. Jun 27, 2016
    • Jaime Pérez's avatar
      bugfix: Resolve issue with incorrect self URL when using symlinks. · c72b6203
      Jaime Pérez authored
      Recent commits have introduced a new way to obtain the self URL, honouring whatever is specified in 'baseurlpath'. However, this new code breaks when accessing SimpleSAMLphp through a path containing symbolic links in the file system, since the base directory refers always to the real path while the $_SERVER contents reflect what the web server sees (symlinks included). We use realpath() to convert a path with symlinks to a canonical path that we can compare.
      c72b6203
  9. Jun 08, 2016
  10. Jun 07, 2016
  11. Jun 03, 2016
  12. Jun 02, 2016
  13. Apr 20, 2016
  14. Apr 19, 2016
  15. Apr 18, 2016
  16. Mar 03, 2016
  17. Mar 02, 2016
  18. Jan 19, 2016
  19. Jan 15, 2016
  20. Nov 06, 2015
  21. Oct 21, 2015
  22. Jun 03, 2015
  23. Apr 23, 2015
  24. Apr 22, 2015
  25. Apr 21, 2015
Loading