File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,9 @@ function onBeforeRequest(details) {
8787 // If there is a username / password, put them aside during the ruleset
8888 // analysis process
8989 var tmpuserinfo = tmpuri . userinfo ( ) ;
90- tmpuri . userinfo ( '' ) ;
90+ if ( tmpuserinfo ) {
91+ tmpuri . userinfo ( '' ) ;
92+ }
9193
9294 var canonical_url = tmpuri . toString ( ) ;
9395 if ( details . url != canonical_url && tmpuserinfo === '' ) {
@@ -141,7 +143,9 @@ function onBeforeRequest(details) {
141143 // re-insert userpass info which was stripped temporarily
142144 // while rules were applied
143145 var finaluri = new URI ( newuristr ) ;
144- finaluri . userinfo ( tmpuserinfo ) ;
146+ if ( tmpuserinfo ) {
147+ finaluri . userinfo ( tmpuserinfo ) ;
148+ }
145149 var finaluristr = finaluri . toString ( ) ;
146150 log ( DBUG , "Redirecting from " + a . href + " to " + finaluristr ) ;
147151 return { redirectUrl : finaluristr } ;
You can’t perform that action at this time.
0 commit comments