Password Reset - Email Password Reset URL feature stops working, after Service Portal Page Redirection is configured


Follow section Configure the Service Portal login page on below link to change system property:
Then the Email Password Reset URL stops working.
The URL in the pwd resetting email is redirected to service portal page.


Steps to Reproduce

  1. Change system property: to new SPEntryPage(). getLoginURL()
  2. Password Reset > Processes > Default Self Service > make sure Email Password Reset URL is ticked. Click on the Public URL, and reset password for a demo user.
  3. Open sysevent table > open latest record that has name password.reset.url, copy the URL in Parm 2, then open the URL in a different browser.

    The page is redirected to below page


In the Script Include: SPEntryPage, immediately after this line: 
    var sPage = session.getProperty("starting_page"); 

add this: 
    if (nt && nt.startsWith("$")) 

Related Problem: PRB1246476