Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bestpractical/rt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsunnavy <sunnavy@bestpractical.com>2022-07-29 21:31:54 +0300
committerJim Brandt <jbrandt@bestpractical.com>2022-08-01 15:57:57 +0300
commit61e979e678fb71997a0e5301a050d21c51962c7f (patch)
treef49d127b69890ada7fae3144bd33be82b8d48011
parent15158273c6779a54011bf2c2d0b4182030da9b3c (diff)
Support arbitrary user names in .rt_sessions
Previously we only allowed "\w+" there, which was far less than what RT supports. This commit changes to ".+" to remove the unnecessary limit. Inspired by PR #336 on github. Thanks chutzimir!
-rw-r--r--bin/rt.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/rt.in b/bin/rt.in
index 879f1f04a2..136440aea3 100644
--- a/bin/rt.in
+++ b/bin/rt.in
@@ -1212,8 +1212,8 @@ sub submit {
while (<$handle>) {
chomp;
next if /^$/ || /^#/;
- next unless m#^https?://[^ ]+ \w+ [^;,\s]+=[0-9A-Fa-f]+$#;
- my ($server, $user, $cookie) = split / /, $_;
+ next unless m#^(https?://[^ ]+) (.+) ([^;,\s]+=[0-9A-Fa-f]+)$#;
+ my ($server, $user, $cookie) = ($1, $2, $3);
$sids->{$server}{$user} = $cookie;
}
return 1;