This repository was archived by the owner on Dec 9, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
main/java/com/appirio/tech/core/service/identity/resource
test/java/com/appirio/tech/core/service/identity/resource Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1362,7 +1362,8 @@ protected String getResetPasswordUrlPrefix(HttpServletRequest request) {
13621362 String resetPasswordUrlPrefix = request .getParameter ("resetPasswordUrlPrefix" );
13631363 if (resetPasswordUrlPrefix !=null ) {
13641364 // Sanitize / ensure domains other than topcoder.com or topcoder-dev.com can't be used.
1365- int i = resetPasswordUrlPrefix .indexOf ("://" ) + 3 ;
1365+ int i = resetPasswordUrlPrefix .indexOf ("://" );
1366+ i = i < 0 ? 0 : i + 3 ;
13661367 String domainName = resetPasswordUrlPrefix .substring (i );
13671368 i = domainName .indexOf ("/" );
13681369 domainName = domainName .substring (0 , i );
Original file line number Diff line number Diff line change @@ -3678,7 +3678,7 @@ public void testGetResetPasswordUrlPrefix_SpecificDomain_Connect() {
36783678 public void testGetResetPasswordUrlPrefix_UrlSpecified () {
36793679 // mock
36803680 String source = "connect" ;
3681- String prefix = "DUMMY-PREFIX " ;
3681+ String prefix = "DUMMY-HOST.topcoder-dev.com " ;
36823682 HttpServletRequest request = mock (HttpServletRequest .class );
36833683 doReturn (source ).when (request ).getParameter ("source" );
36843684 doReturn (prefix ).when (request ).getParameter ("resetPasswordUrlPrefix" );
You can’t perform that action at this time.
0 commit comments