summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2016-11-23 17:31:35 -0600
committerMike Greiling <mike@pixelcog.com>2016-11-23 17:33:55 -0600
commit5b9c4f48724c8a8eb9556719239be996366fd005 (patch)
tree3e98c4c949001b1eafc148e8c2b9981077c922dd
parent5c6d3a99efa1d29291f0b58655d9fc7febb970f8 (diff)
downloadgitlab-ce-5b9c4f48724c8a8eb9556719239be996366fd005.tar.gz
properly escape username validation error message flash23813-fix-username-character-validation-message
-rw-r--r--app/views/profiles/update_username.js.haml3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/profiles/update_username.js.haml b/app/views/profiles/update_username.js.haml
index de1337a2a24..5307e0b48cb 100644
--- a/app/views/profiles/update_username.js.haml
+++ b/app/views/profiles/update_username.js.haml
@@ -2,5 +2,6 @@
:plain
new Flash("Username successfully changed", "notice")
- else
+ - error = @user.errors.full_messages.first
:plain
- new Flash("Username change failed - #{@user.errors.full_messages.first}", "alert")
+ new Flash("Username change failed - #{escape_javascript error.html_safe}", "alert")