Skip to content
Snippets Groups Projects
  1. Aug 03, 2017
  2. Aug 02, 2017
  3. Aug 01, 2017
  4. Jul 31, 2017
  5. Jul 20, 2017
  6. Jul 18, 2017
  7. Jul 13, 2017
  8. Jul 05, 2017
  9. Jul 04, 2017
    • Jaime Pérez Crespo's avatar
      Further optimize the SimpleSAML\Module class. · 7b3a5c0d
      Jaime Pérez Crespo authored
      Instead of one cache, we need to use two: one for the list of modules available, and the other for the details for them. Those caches should be filled independently, so that someone calling getModules() does not trigger the code checking of the modules are enabled or finding their hooks.
    • Jaime Pérez Crespo's avatar
      Do not automatically load all the template directories of all modules. · 7ec9caa0
      Jaime Pérez Crespo authored
      It has also an impact in performance, and covers an unlikely scenario. Instead, if you plan to use templates from another module, now you need to call the "addTemplatesFromModule()" method right after creating the template. That way you can register manually what templates you are supposed to use, being much more efficient.
    • Jaime Pérez Crespo's avatar
      Remove the 'templateInit' hook. · a506502b
      Jaime Pérez Crespo authored
      An alternative way to inject data in the templates should be used. This has a terrible impact in performance, and could have undesired side effects.
    • Jaime Pérez Crespo's avatar
      Add a method to get the twig object used in a template. · d0e09690
      Jaime Pérez Crespo authored
      This allows template users to use their own twig extensions if they want, while also allowing us to remove the "twigInit" hook. Hooks come at a price, and it doesn't make much sense to use them in this case, as they would only be useful if a module wants to add a twig extension even if the code instantiating SimpleSAML_XHTML_Template does not belong to that module. This could lead to unexpected behaviour (i.e. a module adding a hook that creates trouble for the templates defined in another module), so given the lack of use cases supporting the hook and the possible negative consequences implied, it's better to remove it.
    • Jaime Pérez Crespo's avatar
      Merge branch 'Issue648' · f429c457
      Jaime Pérez Crespo authored
      f429c457
  10. Jun 30, 2017
    • Jaime Pérez Crespo's avatar
      Enhance the performance of SimpleSAML\Module. · 4e68df80
      Jaime Pérez Crespo authored
      The issue here is that every time we need to list the modules or check if they are enabled, we just iterate over the modules directory and subdirectories, which is terribly expensive. Instead of doing so, we build a cache of modules specifying if they are enabled or not. In the end, this is also fixing another issue, given that enabling/disabling a module in the middle of a request being processed could lead to inconsistencies and unexpected behaviour (likely exceptions and horrible crashes). Modules should be checked in the beginning of a request and their state (enabled/disabled) frozen until the request is processed to avoid that, and this is the way to achieve so.
      
      Additionally, we take the chance to check if modules are enabled when we search for them. This reduces the processing time to around a third of the original without this fix.
    • Jaime Pérez Crespo's avatar
      Fix performance issue with the portal module. · 0965bf14
      Jaime Pérez Crespo authored
      When the module tries to build up a menu, it instantiates a new "random" template (from another module, sanitycheck) to get a translator that it can use to translate the menu options. This is awfully wrong, as it forces SSP to load another template, reinit Twig, the translation system, and so on. Instead, a new instance of SimpleSAML\Locale\Translate should be more than enough.
    • Jaime Pérez Crespo's avatar
      Fix a bug in the assertion consumer service. · 0eea5c8b
      Jaime Pérez Crespo authored
      If we get a response with an InResponseTo attribute that doesn't match a valid state array, and the response is not a duplicate, we should continue with the response as an unsolicited one.
  11. Jun 23, 2017
  12. Jun 22, 2017
Loading