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
ISPConfig
ISPConfig 3
Commits
d84a2dcb
Commit
d84a2dcb
authored
Jan 21, 2015
by
Florian Schaal
Browse files
fixed sql-queries in dns_dmarc_edit.php
parent
74df3125
Changes
1
Hide whitespace changes
Inline
Side-by-side
interface/web/dns/dns_dmarc_edit.php
View file @
d84a2dcb
...
...
@@ -227,14 +227,14 @@ class page_action extends tform_actions {
$domain_name
=
rtrim
(
$soa
[
'origin'
],
'.'
);
// DMARC requieres at least one active dkim-record...
$sql
=
"SELECT * FROM dns_rr WHERE name LIKE ? AND type='TXT' AND data like 'v=DKIM1;%' AND active='Y'"
;
$temp
=
$app
->
db
->
queryAllRecords
(
$sql
,
'%._domainkey.$domain_name
'
.
'.'
);
if
(
!
is_arra
y
(
$temp
))
{
$temp
=
$app
->
db
->
queryAllRecords
(
$sql
,
'%._domainkey.
'
.
$domain_name
.
'.'
);
if
(
empt
y
(
$temp
))
{
if
(
isset
(
$app
->
tform
->
errorMessage
))
$app
->
tform
->
errorMessage
=
'<br/>'
.
$app
->
tform
->
errorMessage
;
$app
->
tform
->
errorMessage
.
=
$app
->
tform
->
wordbook
[
'dmarc_no_dkim_txt'
]
.
$email
;
}
// ... and an active spf-record (this breaks the current draft but DMARC is useless if you use DKIM or SPF
$sql
=
"SELECT * FROM dns_rr WHERE name LIKE ? AND type='TXT' AND (data LIKE 'v=spf1
;
%' AND active = 'y')"
;
$sql
=
"SELECT * FROM dns_rr WHERE name LIKE ? AND type='TXT' AND (data LIKE 'v=spf1%' AND active = 'y')"
;
$temp
=
$app
->
db
->
queryAllRecords
(
$sql
,
$domain_name
.
'.'
);
// abort if more than 1 active spf-records (backward-compatibility)
if
(
is_array
(
$temp
[
1
]))
{
...
...
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