Merge pull request #4096 from aryanraj/master

Fix: Added underscore to my_redirect regex
This commit is contained in:
Régis Hanol 2016-03-21 10:21:28 +01:00
commit 9c2b30d39b

View File

@ -165,7 +165,7 @@ class UsersController < ApplicationController
end
def my_redirect
raise Discourse::NotFound if params[:path] !~ /^[a-z\-\/]+$/
raise Discourse::NotFound if params[:path] !~ /^[a-z_\-\/]+$/
if current_user.blank?
cookies[:destination_url] = "/my/#{params[:path]}"