Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilherme Filippo
ISPConfig 3
Commits
d46057ae
Commit
d46057ae
authored
Feb 12, 2009
by
tbrehm
Browse files
Escape searchterm for preg in user mail filter.
parent
a3e2d208
Changes
1
Hide whitespace changes
Inline
Side-by-side
interface/web/mail/mail_user_filter_edit.php
View file @
d46057ae
...
...
@@ -129,14 +129,16 @@ if ( ".'$RETURNCODE'." != 0 )
$content
.
=
"if (/^"
.
$this
->
dataRecord
[
"source"
]
.
":"
;
$searchterm
=
preg_quote
(
$this
->
dataRecord
[
"searchterm"
]);
if
(
$this
->
dataRecord
[
"op"
]
==
'contains'
)
{
$content
.
=
".*"
.
$
this
->
dataRecord
[
"
searchterm
"
]
.
"/:h)
\n
"
;
$content
.
=
".*"
.
$searchterm
.
"/:h)
\n
"
;
}
elseif
(
$this
->
dataRecord
[
"op"
]
==
'is'
)
{
$content
.
=
$
this
->
dataRecord
[
"
searchterm
"
]
.
"$/:h)
\n
"
;
$content
.
=
$searchterm
.
"$/:h)
\n
"
;
}
elseif
(
$this
->
dataRecord
[
"op"
]
==
'begins'
)
{
$content
.
=
$
this
->
dataRecord
[
"
searchterm
"
]
.
"/:h)
\n
"
;
$content
.
=
$searchterm
.
"/:h)
\n
"
;
}
elseif
(
$this
->
dataRecord
[
"op"
]
==
'ends'
)
{
$content
.
=
".*"
.
$
this
->
dataRecord
[
"
searchterm
"
]
.
"$/:h)
\n
"
;
$content
.
=
".*"
.
$searchterm
.
"$/:h)
\n
"
;
}
$content
.
=
"{\n"
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment