Be exceedingly less strict on the question format.
This may ultimately be a security problem; I wanted to filter the question for only characters that are valid in bean-query, and at some point, the right move is to look up what characters in the bean-query parser that are allowed. However, I kept running into problems of finding new characters and this was an easier hack.
This commit is contained in:
parent
72559aa8d6
commit
c4e5664bb5
1 changed files with 2 additions and 1 deletions
|
@ -184,7 +184,8 @@ while (1) {
|
|||
print STDERR "sleep for 2 seconds\n" if $VERBOSE > 5;
|
||||
sleep 2;
|
||||
next;
|
||||
} elsif ($query{question} !~ /^[\,\=\~\-\@\w.\s\"\'\_\(\)\<\>\*\.\!]+$/) {
|
||||
# } elsif ($query{question} !~ /^[\,\=\~\-\@\w.\s\"\'\_\(\)\<\>\*\.\!\^\:\$\|]+$/) {
|
||||
} elsif ($query{question} !~ /^[\s\S]+$/) {
|
||||
print STDERR "Query string $query{question} looks suspicious, not running beancount query!\n";
|
||||
(tied %query)->shlock;
|
||||
$query{fifoName} = mktemp("REJECTED_beancount-query-fifo-this-file-does-not-exist_${$}_XXXXXXXXX");
|
||||
|
|
Loading…
Reference in a new issue