Skip to content

Commit 5ae14b4

Browse files
committed
CI Checks
1 parent 2191b0e commit 5ae14b4

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

classes/check/dnsnoreply.php

+3
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ public function get_result() : result {
8282
} else if (str_contains($domain, '.' . $noreplydomain)) {
8383
$status = result::OK;
8484
$summary = "LMS is a subdomain of noreply domain";
85+
} else if (str_contains($noreplydomain, '.' . $domain)) {
86+
$status = result::OK;
87+
$summary = "Noreply domain is a subdomain of LMS";
8588
} else if (str_contains($noreplydomain, '.' . $primarydomain)) {
8689
$summary = "LMS and noreply domain have a shared domain";
8790
} else {

classes/dns_util.php

+11-4
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ public function get_subdomains($domain) {
8686

8787
/**
8888
* Get spf txt record contents
89+
* @param string $domain specify a different domain
8990
* @return string txt record
9091
*/
9192
public function get_spf_record($domain = '') {
@@ -122,7 +123,7 @@ public function get_mxtoolbox_spf_url() {
122123
* Returns the include if matched
123124
*
124125
* The include can have a wildcard and this will return the actual matched value.
125-
* @param string include domain
126+
* @param string $include include domain
126127
* @return string matched include
127128
*/
128129
public function include_present(string $include) {
@@ -151,6 +152,8 @@ public function get_dkim_selector() {
151152

152153
/**
153154
* Get DKIM txt record contents
155+
* @param string $selector DKIM selector
156+
* @param string $domain DKIM domain
154157
* @return string txt record
155158
*/
156159
public function get_dkim_dns_domain($selector, $domain) {
@@ -159,6 +162,7 @@ public function get_dkim_dns_domain($selector, $domain) {
159162

160163
/**
161164
* Get DKIM txt record contents
165+
* @param string $selector DKIM selector
162166
* @return string txt record
163167
*/
164168
public function get_dkim_record($selector) {
@@ -175,7 +179,7 @@ public function get_dkim_record($selector) {
175179

176180
/**
177181
* Get DKIM txt record contents
178-
* @return string txt record
182+
* @return array txt record
179183
*/
180184
public function get_dmarc_dns_record() {
181185
$domain = $this->get_noreply_domain();
@@ -203,13 +207,14 @@ public function get_dmarc_dns_record() {
203207

204208
/**
205209
* Get MX record contents
206-
* @return string txt record
210+
* @param string $domain domain to check
211+
* @return array txt record
207212
*/
208213
public function get_mx_record($domain) {
209214

210215
$records = @dns_get_record($domain, DNS_MX);
211216
if (empty($records)) {
212-
return;
217+
return [];
213218
}
214219
usort($records, function($a, $b) {
215220
if ($a['pri'] == $b['pri']) {
@@ -222,6 +227,8 @@ public function get_mx_record($domain) {
222227

223228
/**
224229
* Get matching record contents
230+
* @param string $domain domain to check
231+
* @param string $match search for specific match
225232
* @return string txt record
226233
*/
227234
public function get_matching_dns_record($domain, $match) {

0 commit comments

Comments
 (0)