Changeset 3464204
- Timestamp:
- 02/18/2026 10:29:02 AM (6 weeks ago)
- Location:
- pagelayer/trunk
- Files:
-
- 6 edited
-
css/pagelayer-editor.css (modified) (1 diff)
-
init.php (modified) (1 diff)
-
main/ajax.php (modified) (7 diffs)
-
main/functions.php (modified) (2 diffs)
-
pagelayer.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pagelayer/trunk/css/pagelayer-editor.css
r3384061 r3464204 2601 2601 } 2602 2602 2603 .pagelayer-widget-group h5:only-child, 2604 .pagelayer-leftbar-group h5:only-child{ 2605 display: none; 2606 } 2607 2603 2608 .pagelayer-global-widget-pro{ 2604 2609 text-align: center; -
pagelayer/trunk/init.php
r3411050 r3464204 6 6 define('PAGELAYER_BASE', plugin_basename(PAGELAYER_FILE)); 7 7 define('PAGELAYER_PREMIUM_BASE', 'pagelayer-pro/pagelayer-pro.php'); 8 define('PAGELAYER_VERSION', '2.0. 7');8 define('PAGELAYER_VERSION', '2.0.8'); 9 9 define('PAGELAYER_DIR', dirname(PAGELAYER_FILE)); 10 10 define('PAGELAYER_SLUG', 'pagelayer'); -
pagelayer/trunk/main/ajax.php
r3384061 r3464204 228 228 229 229 // Restrict contributors from setting 'publish' or modifying unauthorized fields 230 $c an_publish = current_user_can($post_type_obj->cap->publish_posts);231 if(!$c an_publish){230 $current_user_can_publish = current_user_can($post_type_obj->cap->publish_posts); 231 if(!$current_user_can_publish){ 232 232 if(!in_array($post['post_status'], ['draft', 'pending'])){ 233 233 $post['post_status'] = 'pending'; // Force pending status … … 337 337 338 338 // Any contact templates ? 339 if(!empty($_REQUEST['contacts']) ){339 if(!empty($_REQUEST['contacts']) && $current_user_can_publish){ 340 340 update_post_meta($postID, 'pagelayer_contact_templates', $_REQUEST['contacts']); 341 341 }else{ … … 1271 1271 if(isset($formdata['cfa-custom-template']) && !empty($formdata['cfa-post-id'])){ 1272 1272 $post_id = (int) $formdata['cfa-post-id']; 1273 1274 if(!empty($post_id) ){1273 1274 if(!empty($post_id) && ( get_post_status( $post_id ) === 'publish' || current_user_can('publish_posts') )){ 1275 1275 $contact_array = get_post_meta($post_id, 'pagelayer_contact_templates', true); 1276 1276 … … 1328 1328 } 1329 1329 1330 if(is_array($i)){1331 $i = pagelayer_flat_join($i);1332 }1333 1334 // Record a reply to if it is to be used1335 if(is_email(trim($i)) && empty($reply_to)){1336 $reply_to = trim($i);1337 }1338 1339 1330 $body .= $k."\t : \t $".$k."\n"; 1340 1331 … … 1343 1334 $body .= "\n\n --\n This e-mail was sent from a contact form (".get_home_url().")"; 1344 1335 1336 } 1337 1338 // Add attachment 1339 if(!empty($_FILES)){ 1340 add_action('phpmailer_init', 'pagelayer_cf_email_attachment', 10, 1); 1341 } 1342 1343 $sanitized_data = array(); 1344 1345 // If we are using HTML, then we should escape html as well 1346 foreach($formdata as $k => $i){ 1347 1348 if(is_array($i)){ 1349 $i = pagelayer_flat_join($i); 1350 } 1351 1352 $i = pagelayer_esc_crlf($i); 1353 1354 if(!empty($use_html)){ 1355 $i = esc_html($i); 1356 } 1357 1358 // Sanitize text field 1359 $i = sanitize_text_field($i); 1360 1361 // Record a reply to if it is to be used 1362 if(is_email($i) && empty($reply_to)){ 1363 $reply_to = $i; 1364 } 1365 1366 $sanitized_data[$k] = $i; 1345 1367 } 1346 1368 … … 1350 1372 } 1351 1373 1352 // Add attachment1353 if(!empty($_FILES)){1354 add_action('phpmailer_init', 'pagelayer_cf_email_attachment', 10, 1);1355 }1356 1357 // If we are using HTML, then we should escape html as well1358 if(!empty($use_html)){1359 foreach($formdata as $k => $i){1360 1361 if(is_array($i)){1362 $i = pagelayer_flat_join($i);1363 }1364 1365 $formdata[$k] = esc_html($i);1366 }1367 }1368 1369 1374 // Add Site Title as option in formdata 1370 $ formdata['site_title'] = get_bloginfo( 'name' );1375 $sanitized_data['site_title'] = get_bloginfo( 'name' ); 1371 1376 1372 1377 // Do parse a variables 1373 $to_mail = pagelayer_replace_vars($to_mail, $ formdata, '$');1374 $from_mail = pagelayer_replace_vars($from_mail, $ formdata, '$');1375 $subject = pagelayer_replace_vars($subject, $ formdata, '$');1376 $headers = pagelayer_replace_vars($headers, $ formdata, '$');1377 $body = pagelayer_replace_vars($body, $ formdata, '$');1378 $to_mail = pagelayer_replace_vars($to_mail, $sanitized_data, '$'); 1379 $from_mail = pagelayer_replace_vars($from_mail, $sanitized_data, '$'); 1380 $subject = pagelayer_replace_vars($subject, $sanitized_data, '$'); 1381 $headers = pagelayer_replace_vars($headers, $sanitized_data, '$'); 1382 $body = pagelayer_replace_vars($body, $sanitized_data, '$'); 1378 1383 1379 1384 if ( $use_html && ! preg_match( '%<html[>\s].*</html>%is', $body ) ) { … … 1388 1393 } 1389 1394 1390 $to_mail = apply_filters('pagelayer_contact_send', $to_mail, $ formdata);1395 $to_mail = apply_filters('pagelayer_contact_send', $to_mail, $sanitized_data); 1391 1396 1392 1397 // Send the email -
pagelayer/trunk/main/functions.php
r3411050 r3464204 1291 1291 1292 1292 // These events not start with on 1293 $not_allowed = array('click', 'dblclick', 'mousedown', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'load', 'unload', 'change', 'submit', 'reset', 'select', 'blur', 'focus', 'keydown', 'keypress', 'keyup', 'afterprint', 'beforeprint', 'beforeunload', 'error', 'hashchange', 'message', 'offline', 'online', 'pagehide', 'pageshow', 'popstate', 'resize', 'storage', 'contextmenu', 'input', 'invalid', 'search', 'mousewheel', 'wheel', 'drag', 'dragend', 'dragenter', 'dragleave', 'dragover', 'dragstart', 'drop', 'scroll', 'copy', 'cut', 'paste', 'abort', 'canplay', 'canplaythrough', 'cuechange', 'durationchange', 'emptied', 'ended', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting', 'toggle', 'animationstart', 'animationcancel', 'animationend', 'animationiteration', 'auxclick', 'beforeinput', 'beforematch', 'beforexrselect', 'compositionend', 'compositionstart', 'compositionupdate', 'contentvisibilityautostatechange', 'focusout', 'focusin', 'fullscreenchange', 'fullscreenerror', 'gotpointercapture', 'lostpointercapture', 'mouseenter', 'mouseleave', 'pointercancel', 'pointerdown', 'pointerenter', 'pointerleave', 'pointermove', 'pointerout', 'pointerover', 'pointerrawupdate', 'pointerup', 'scrollend', 'securitypolicyviolation', 'touchcancel', 'touchend', 'touchmove', 'touchstart', 'transitioncancel', 'transitionend', 'transitionrun', 'transitionstart', 'MozMousePixelScroll', 'DOMActivate', 'afterscriptexecute', 'beforescriptexecute', 'DOMMouseScroll', 'willreveal', 'gesturechange', 'gestureend', 'gesturestart', 'mouseforcechanged', 'mouseforcedown', 'mouseforceup', 'mouseforceup' );1293 $not_allowed = array('click', 'dblclick', 'mousedown', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'load', 'unload', 'change', 'submit', 'reset', 'select', 'blur', 'focus', 'keydown', 'keypress', 'keyup', 'afterprint', 'beforeprint', 'beforeunload', 'error', 'hashchange', 'message', 'offline', 'online', 'pagehide', 'pageshow', 'popstate', 'resize', 'storage', 'contextmenu', 'input', 'invalid', 'search', 'mousewheel', 'wheel', 'drag', 'dragend', 'dragenter', 'dragleave', 'dragover', 'dragstart', 'drop', 'scroll', 'copy', 'cut', 'paste', 'abort', 'canplay', 'canplaythrough', 'cuechange', 'durationchange', 'emptied', 'ended', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting', 'toggle', 'animationstart', 'animationcancel', 'animationend', 'animationiteration', 'auxclick', 'beforeinput', 'beforematch', 'beforexrselect', 'compositionend', 'compositionstart', 'compositionupdate', 'contentvisibilityautostatechange', 'focusout', 'focusin', 'fullscreenchange', 'fullscreenerror', 'gotpointercapture', 'lostpointercapture', 'mouseenter', 'mouseleave', 'pointercancel', 'pointerdown', 'pointerenter', 'pointerleave', 'pointermove', 'pointerout', 'pointerover', 'pointerrawupdate', 'pointerup', 'scrollend', 'securitypolicyviolation', 'touchcancel', 'touchend', 'touchmove', 'touchstart', 'transitioncancel', 'transitionend', 'transitionrun', 'transitionstart', 'MozMousePixelScroll', 'DOMActivate', 'afterscriptexecute', 'beforescriptexecute', 'DOMMouseScroll', 'willreveal', 'gesturechange', 'gestureend', 'gesturestart', 'mouseforcechanged', 'mouseforcedown', 'mouseforceup', 'mouseforceup', 'beforetoggle'); 1294 1294 1295 1295 $not_allowed = implode('|', $not_allowed); … … 3985 3985 return false; 3986 3986 } 3987 3988 function pagelayer_esc_crlf($value){ 3989 3990 // Remove CRLF to prevent header injection 3991 $value = str_replace(array("\r", "\n", "%0a", "%0d"), '', $value); 3992 3993 // Trim spaces 3994 $value = trim($value); 3995 3996 return $value; 3997 } -
pagelayer/trunk/pagelayer.php
r3411050 r3464204 4 4 Plugin URI: http://wordpress.org/plugins/pagelayer/ 5 5 Description: Pagelayer is a WordPress page builder plugin. Its very easy to use and very light on the browser. 6 Version: 2.0. 76 Version: 2.0.8 7 7 Author: Pagelayer Team 8 8 Author URI: https://pagelayer.com/ -
pagelayer/trunk/readme.txt
r3411050 r3464204 5 5 Tested up to: 6.9 6 6 Requires PHP: 5.5 7 Stable tag: 2.0. 77 Stable tag: 2.0.8 8 8 License: LGPL v2.1 9 9 License URI: http://www.gnu.org/licenses/lgpl-2.1.html … … 132 132 == Changelog == 133 133 134 = 2.0.8 (FEB 16, 2026) = 135 * [Bug Fix] Improved XSS security checks. 136 * [Bug Fix] Sanitized the contact form "Reply-To" header to prevent CRLF injection. 137 * [Bug Fix] Restricted low-level users from adding custom templates in the contact form. 138 134 139 = 2.0.7 (DEC 02, 2025) = 135 140 * [Task] Tested compatibility with WordPress 6.9.
Note: See TracChangeset
for help on using the changeset viewer.