Fix: Added underscore to my_redirect regex

This commit is contained in:
Aryan Raj 2016-03-19 17:33:10 +05:30
parent 67a5fc39de
commit c3507a3242

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]}"