Skip to content
Snippets Groups Projects
  1. Oct 16, 2017
  2. Oct 10, 2017
    • Jaime Pérez Crespo's avatar
      bugfix: Make sure no JS code can be injected into redirected URLs · 5f074e97
      Jaime Pérez Crespo authored
      In order to fix this, we first sanitize any URL given to SimpleSAML\Utils\HTTP::checkURLAllowed() so that we make sure we have a true URL without spurious characters. Secondly, we stop using an "onload" event in the body of the redirect page to trigger the redirect automatically. Instead, we use a "meta refresh" redirection.
      
      This double remediation is because there were two issues here: one, we were printing user input inside a chunk of javascript code. The other exploits the fact that the header() function silently breaks when a null character is part of the URL given to a "Location" header. In that case, the HTTP 302 Redirection doesn't happen, and then the browser loads the HTML and goes through it, running the injected javascript.
      
      This fixes #699.
      5f074e97
  3. Sep 07, 2017
  4. Sep 01, 2017
  5. Jul 20, 2017
    • Scato Eggen's avatar
      Invalidate opcache after writing a file · cd8179d7
      Scato Eggen authored
      When opcache.validate_timestamps is disabled, then the new metadata will not be read after a metarefresh.
      This can be solved by adding the metadata file to an opcache blacklist, but calling opcache_invalidate()
      after writing a file is a nice out-of-the-box solution.
      
      Hopefully, this will enable everybody that is using simplesamlphp to disable opcache.validate_timestamps
      without running into problems.
      cd8179d7
  6. Jul 05, 2017
  7. May 05, 2017
    • Matt Schwager's avatar
      Added tests for SimpleSAML\Utils\Crypto · 8e39cd49
      Matt Schwager authored
      This also required adding an additional argument to
      SimpleSAML\Utils\Crypto::loadPrivateKey to ease in testing. Without
      this additional argument, SimpleSAML_Configuration::getBaseDir eventually
      gets called to determine the private key location.  This doesn't work
      well with vfsstream. This argument shouldn't cause too much trouble, and
      seems cohesive enough with the function's purpose.
      8e39cd49
    • Jaime Pérez Crespo's avatar
      bugfix: SimpleSAML\Utils\Crypto returns true for different strings using PHP < 5.6. · 4bc62965
      Jaime Pérez Crespo authored
      The reason was the lack of conversion to integer for each character of the strings before applying the XOR operator to them. The operator returns always an empty string when applied to two characters, and applying a binary-wise OR between 0 and an empty string, yields 0. Therefore, $diff is always 0, and the function returns true for every two strings with same length, regardless of their contents.
      4bc62965
  8. Apr 26, 2017
  9. Mar 30, 2017
  10. Mar 27, 2017
  11. Mar 17, 2017
  12. Feb 22, 2017
  13. Jan 20, 2017
  14. Jan 19, 2017
  15. Jan 16, 2017
  16. Jan 10, 2017
  17. Nov 09, 2016
  18. 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
  19. Aug 10, 2016
    • Jaime Pérez's avatar
      Make the 'debug' configuration option more fine-grained. · 6c3d49f9
      Jaime Pérez authored
      Some things, like logging of SAML messages or backtraces, are controlled with the 'debug' configuration option. However, it might be possible that we don't want one while we want the other, but that's impossible with just one option.
      
      This commit allows us to configure debugging options independently, but groupping all of them together. This is particularly useful if we want to log backtraces to debug errors, for example, but we don't want to log SAML messages to keep the privacy of the users. This also allows us to get rid of the 'debug.validatexml' configuration option, and group it with other debug options.
      
      This changes are backwards-compatible. Old and new configurations will work at the same time.
      6c3d49f9
  20. Aug 05, 2016
  21. Jul 26, 2016
    • Jaime Pérez's avatar
      Bump the version of the SAML2 library. · b02c5432
      Jaime Pérez authored
      Now we are finally using the 2.x branch of the SAML2 library, which was also migrated to use namespaces. Even though the library provides an autoloader that allows loading the classes with the old names using class aliasing, we need to do the migration in one commit (at least for most part of it). This is due to the way SimpleSAMLphp checks data types, using inheritance to check objects agains abstract or more general classes. Even though class aliasing works, there's no way to replicate those relationships, and type checks that use the old class names will fail because the aliases are virtually new classes that don't inherit from others.
      b02c5432
Loading