Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-3611

CMS authentication URL breaks for AngularJs apps in the CMS



    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 4.0.0
    • Fix Version/s: 4.0.0
    • Component/s: None
    • Labels:
    • Similar issues:
    • Sprint:
      Tiger Sprint 125


      The CMS now contains several AngularJs apps that can trigger a security handshake between site and CMS. In that case, the CMS authentication URL created by the CmsSecurityValve is not correct. It uses the Referer header as the base for the authentical URL, which works fine in Wicket-based calls in the CMS. For example, the Referer header is then always 'http://localhost:8080/cms', which will create an authentication URL like 'http://localhost:8080/cms/auth?destinationUrl=...'.

      However, AngularJs apps will first get an index.html file that contains the 'root' of the app. Subsequent Ajax calls by the app that trigger the security handshake will then use a Referer header that looks like, for example, 'http://localhost:8080/cms/angular/someapp/index.html'. The CMS authentication URL will then become 'http://localhost:8080/cms/angular/someapp/index.html/auth?destinationUrl=...', which won't work since the auth filter is not hit.

      Instead of relying on the Referer header, the CmsSecurityValve should compare the fartest request host with the known CMS locations of the current request, and use the CMS location that matches as the base for the authentication URL.


          Issue Links



              • Assignee:
                pgupta Pankaj Gupta (Inactive)
                mdenburger Mathijs den Burger (Inactive)
              • Votes:
                0 Vote for this issue
                3 Start watching this issue


                • Created: