File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
app/code/Magento/Customer/Model Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -126,8 +126,10 @@ public function getLoginUrlParams()
126
126
&& !$ this ->customerSession ->getNoReferer ()
127
127
&& $ this ->request ->isGet ()
128
128
) {
129
- $ referer = $ this ->urlBuilder ->getUrl ('*/*/* ' , ['_current ' => true , '_use_rewrite ' => true ]);
130
- $ referer = $ this ->urlEncoder ->encode ($ referer );
129
+ $ refererUrl = $ this ->urlBuilder ->getUrl ('*/*/* ' , ['_current ' => true , '_use_rewrite ' => true ]);
130
+ if (!$ this ->isNoRouteUrl ($ refererUrl )) {
131
+ $ referer = $ this ->urlEncoder ->encode ($ refererUrl );
132
+ }
131
133
}
132
134
133
135
if ($ referer ) {
@@ -256,4 +258,17 @@ private function getRequestReferrer()
256
258
}
257
259
return null ;
258
260
}
261
+
262
+ private function isNoRouteUrl ($ url )
263
+ {
264
+ $ defaultNoRouteUrl = $ this ->scopeConfig ->getValue (
265
+ 'web/default/no_route ' ,
266
+ ScopeInterface::SCOPE_STORE
267
+ );
268
+ $ noRouteUrl = $ this ->urlBuilder ->getUrl ($ defaultNoRouteUrl );
269
+ if (strpos ($ url , $ noRouteUrl ) !== false ) {
270
+ return true ;
271
+ };
272
+ return false ;
273
+ }
259
274
}
You can’t perform that action at this time.
0 commit comments