Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

[SKY-8672] removed colon from the list of reserved char validator and app.js res… #1

Open
wants to merge 1 commit into
base: 11.0.2-up1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ public class ReservedCharValidator {
protected static final Logger logger = Logger.getLogger(ReservedCharValidator.class);

// https://tools.ietf.org/html/rfc3986#section-2.2
private static final String[] RESERVED_CHARS = { ":", "/", "?", "#", "[", "@", "!", "$",
/* private static final String[] RESERVED_CHARS = { ":", "/", "?", "#", "[", "@", "!", "$",
"&", "(", ")", "*", "+", ",", ";", "=",
"]", "[", "\\" };*/
Comment on lines +30 to +32

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to leave the commented block? Same question for keyPressed logic below.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did leave it there on purpose, just not sure if we need to or not

private static final String[] RESERVED_CHARS = { "/", "?", "#", "[", "@", "!", "$",
"&", "(", ")", "*", "+", ",", ";", "=",
"]", "[", "\\" };
private ReservedCharValidator() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2417,7 +2417,8 @@ module.directive('kcNoReservedChars', function (Notifications, $translate) {
var keyPressed = String.fromCharCode(event.which || event.keyCode || 0);

// ] and ' can not be used inside a character set on POSIX and GNU
if (keyPressed.match('[:/?#[@!$&()*+,;=]') || keyPressed === ']' || keyPressed === '\'') {
// if (keyPressed.match('[:/?#[@!$&()*+,;=]') || keyPressed === ']' || keyPressed === '\'') {
if (keyPressed.match('[/?#[@!$&()*+,;=]') || keyPressed === ']' || keyPressed === '\'') {
event.preventDefault();
$scope.$apply(function() {
Notifications.warn($translate.instant('key-not-allowed-here', {character: keyPressed}));
Expand Down