Merge pull request #2 from jokey2k/patch-2
Sanitize spamd_sock path for perl taint mode
This commit is contained in:
commit
a11692675f
@ -314,6 +314,10 @@ sub connect_to_spamd_socket {
|
|||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Sanitize for use with taint mode
|
||||||
|
$socket =~ /^([\w\/.-]+)$/;
|
||||||
|
$socket = $1;
|
||||||
|
|
||||||
socket(my $SPAMD, PF_UNIX, SOCK_STREAM, 0) or do {
|
socket(my $SPAMD, PF_UNIX, SOCK_STREAM, 0) or do {
|
||||||
$self->log(LOGERROR, "Could not open socket: $!");
|
$self->log(LOGERROR, "Could not open socket: $!");
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user