- May 05, 2017
-
-
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.
-
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.
-
- Apr 26, 2017
-
-
Jaime Pérez Crespo authored
-
Jaime Pérez Crespo authored
-
Jaime Pérez Crespo authored
This reverts commit b1b0d0ef.
-
Jaime Pérez Crespo authored
This reverts commit c441f9c9.
-
Jaime Pérez Crespo authored
It looks like mb_substr() doesn’t cope well with NULL as the third parameter in PHP 5.3.
-
Jaime Pérez Crespo authored
-
Jaime Pérez Crespo authored
-
Jaime Pérez Crespo authored
-
- Mar 30, 2017
-
-
Jaime Pérez Crespo authored
IVs must be random and one-time (never reused). Additionally, by deriving it from the key, the key length was effectively reduced to 128 bits.
-
Jaime Pérez Crespo authored
It actually needs a DOMNode, so it has been renamed to isDOMNodeOfType(). Additionally, some superfluous asserts() have been removed, and SimpleSAML\Utils\XML::getDOMChildren() has also changed its signature, as it should also receive a DOMNode, not a DOMElement.
-
Jaime Pérez Crespo authored
-
- Mar 27, 2017
-
-
Sergio Gomez authored
-
- Mar 17, 2017
-
-
Jaime Pérez Crespo authored
Use it when constant-time comparisons are needed to avoid side-channel attacks.
-
- Feb 22, 2017
-
-
Jaime Pérez Crespo authored
To put it differently, to avoid OSX machines being identified as windows boxes, “darwin” should be evaluated *before* “win”.
-
- Jan 20, 2017
-
-
Tyler Antonio authored
-
- Jan 16, 2017
-
-
Jaime Pérez Crespo authored
If a standard port is specified, then ignore it. Otherwise, include the port in the check so that non-standard ports must be whitelisted explicitly.
-
- Jan 10, 2017
-
-
Jaime Pérez authored
This resolves #476.
-
Jaime Pérez authored
-
- Nov 09, 2016
-
-
Tyler Antonio authored
Cannot provide array_filter() output directly to empty() in conditional in PHP <= 5.4.
-
Tyler Antonio authored
-
Tyler Antonio authored
-
- Aug 22, 2016
-
-
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.
-
- Aug 10, 2016
-
-
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.
-
- Aug 05, 2016
-
-
Thijs Kinkhorst authored
Issue a notice when the option is used nonetheless. Closes: #432
-
- Jul 26, 2016
-
-
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.
-
- Jul 20, 2016
-
-
Sergio Gomez authored
-
- Jul 15, 2016
-
-
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.
-
- Jul 05, 2016
-
-
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.
-
- Jul 04, 2016
-
-
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.
-
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.
-
- Jul 02, 2016
-
-
Jaime Pérez authored
Make the SimpleSAML\Utils\HTTP::setCookie() method throw the new SimpleSAML\Error\CannotSetCookie exception.
-
Jaime Pérez authored
-
- Jun 27, 2016
-
-
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.
-
- Jun 08, 2016
-
-
Jaime Perez Crespo authored
-
Jaime Perez Crespo authored
Fix build. There was a bug in SimpleSAML\Utils\HTTP::parseQueryString() that was producing an empty parameter with an empty value when the query string was empty.
-
Jaime Perez Crespo authored
Change the implementation of SimpleSAML\Utils\HTTP::getSelfURL() and getSelfURLNoQuery() to honor the 'baseurlpath' configuration option instead of simply using the environment. They were actually broken since they were using it to build the scheme, host and port, but completely ignoring the path, rendering wrong URLs in between what was configured in 'baseurlpath' and the real information in the environment. This resolves #396, but also affects #5. The changes to getSelfURLNoQuery() in #391 are unnecessary now, since we now basically getting the full URL and remove the query afterwards.
-
- Jun 07, 2016
-
-
Jaime Perez Crespo authored
-
Jaime Perez Crespo authored
Be graceful with the 'baseurlpath' configuration option. We should not fail when the trailing slash is missing, just add it.
-