File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 216216 $ line = trim ($ line );
217217 if ($ line != '' && substr ($ line , 0 , 1 ) != '; ' ){
218218 if (strpos ($ line , "; " ) !== FALSE ) {
219- if (!preg_match ("/v=DKIM|v=DMARC / " ,$ line )) {
219+ if (!preg_match ("/ \" [^ \" ]+;[^ \" ]* \" / " , $ line )) {
220220 $ line = substr ($ line , 0 , strpos ($ line , "; " ));
221221 }
222222 }
267267 $ parts = explode (' ' , $ line );
268268
269269 // make elements lowercase
270- $ dkim =@($ parts [3 ]=='"v=DKIM1; ' )?true :false ;
271- $ dmarc =@($ parts [3 ]=='"v=DMARC1; ' )?true :false ;
272-
273270 $ new_parts = array ();
274271 foreach ($ parts as $ part ){
275- if (!$ dkim && !$ dmarc ) {
272+ if (
273+ (strpos ($ part , '; ' ) === false ) &&
274+ (!preg_match ("/^ \"/ " , $ part )) &&
275+ (!preg_match ("/ \"$/ " , $ part ))
276+ ) {
276277 $ new_parts [] = strtolower ($ part );
277278 } else {
278279 $ new_parts [] = $ part ;
You can’t perform that action at this time.
0 commit comments