Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whitespaces enabled in token description #83

Merged
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
21 changes: 21 additions & 0 deletions xmlapi/tokenregister.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,27 @@ if {[info exists sid] && [check_session $sid]} {
foreach pair $pairs {
if {0 != [regexp "^desc=(.*)$" $pair dummy val]} {
set desc $val

# replace URL encoded parts
regsub -all {%20} $desc { } desc
regsub -all {%21} $desc {!} desc
regsub -all {%23} $desc {#} desc
regsub -all {%25} $desc {%} desc
regsub -all {%25} $desc {%} desc
regsub -all {%2A} $desc * desc
regsub -all {%2F} $desc {/} desc
regsub -all {%3F} $desc {?} desc
regsub -all {%5E} $desc {^} desc
regsub -all {%3D} $desc {=} desc
regsub -all {%2C} $desc {,} desc

# disable certain invalid chars
regsub -all {%3C} $desc {_} desc
regsub -all {<} $desc {_} desc
regsub -all {%3E} $desc {_} desc
regsub -all {>} $desc {_} desc
regsub -all {%27} $desc {_} desc
regsub -all {'} $desc {_} desc
break
}
}
Expand Down