We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 343705c commit 863f24aCopy full SHA for 863f24a
lib/modules/apostrophe-pages/lib/api.js
@@ -961,6 +961,10 @@ module.exports = function(self, options) {
961
962
req.slug = self.removeTrailingSlugSlashes(req, req.slug);
963
964
+ // Prevent open redirect attacks based on escaped paths
965
+ // (stomp double slashes)
966
+ req.slug = req.slug.replace(/\/+/g, '/');
967
+
968
if ((!req.slug.length) || (req.slug.charAt(0) !== '/')) {
969
req.slug = '/' + req.slug;
970
}
0 commit comments