Skip to content

Commit

Permalink
Fix: Allow brackets and en dash Unicode character in name and comment…
Browse files Browse the repository at this point in the history
… fields

Allow users to add curved brackets for name fields like target name.
This seems to have worked before the pcre2 adjustments.

Additionally allow the en dash Unicode character (U+2013) for name and
comment fields.

Closes #89

(cherry picked from commit 1883dd0)
  • Loading branch information
bjoernricks committed Dec 14, 2022
1 parent cda13d1 commit 22c1236
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gsad.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ init_validator ()
gvm_validator_add (validator, "setting_value", "^.*$");
gvm_validator_add (validator, "setting_name", "^.*$");
gvm_validator_add (validator, "comment",
"^[-_;':()@[:alnum:]äüöÄÜÖß, \\./]*$");
"^[-_;':()@[:alnum:]äüöÄÜÖß, \\./]*$");
gvm_validator_add (validator, "config_id", "^[a-z0-9\\-]+$");
gvm_validator_add (validator, "condition", "^[[:alnum:] ]*$");
gvm_validator_add (validator, "credential_id", "^[a-z0-9\\-]+$");
Expand Down Expand Up @@ -605,7 +605,7 @@ init_validator ()
gvm_validator_add (validator, "note_required", "(?s)^(.)+$");
gvm_validator_add (validator, "note_id", "^[a-z0-9\\-]+$");
gvm_validator_add (validator, "override_id", "^[a-z0-9\\-]+$");
gvm_validator_add (validator, "name", "^[#\\-_[:alnum:], \\./]*$");
gvm_validator_add (validator, "name", "^[#\\-_[:alnum:], \\./()]*$");
gvm_validator_add (validator, "info_name", "(?s)^.*$");
gvm_validator_add (validator, "info_type", "(?s)^.*$");
gvm_validator_add (validator, "info_id",
Expand Down

0 comments on commit 22c1236

Please sign in to comment.