Fix valid related content url helper method

This commit is contained in:
Bertocq
2017-12-20 14:51:39 +01:00
parent 1e23281c28
commit 01d5656884

View File

@@ -1,6 +1,4 @@
class RelatedContentsController < ApplicationController
VALID_URL = /#{Setting['url']}\/.*\/.*/
skip_authorization_check
respond_to :html, :js
@@ -35,7 +33,7 @@ class RelatedContentsController < ApplicationController
end
def valid_url?
params[:url].match(VALID_URL)
params[:url].start_with?(Setting['url'])
end
def relationable_object