mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- intermediate results with sanitizing form handlers;
This commit is contained in:
@@ -161,18 +161,16 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
|
||||
*/
|
||||
function parse_shortcode_args( $args ) {
|
||||
if ( $this->message_mode == true ) {
|
||||
|
||||
if ( ! empty( $_REQUEST['um_role'] ) ) {
|
||||
$args['template'] = 'message';
|
||||
$roleID = esc_attr( $_REQUEST['um_role'] );
|
||||
$roleID = sanitize_key( $_REQUEST['um_role'] );
|
||||
$role = UM()->roles()->role_data( $roleID );
|
||||
|
||||
if ( ! empty( $role ) && ! empty( $role["status"] ) ) {
|
||||
$message_key = $role["status"] . '_message';
|
||||
if ( ! empty( $role ) && ! empty( $role['status'] ) ) {
|
||||
$message_key = $role['status'] . '_message';
|
||||
$this->custom_message = ! empty( $role[ $message_key ] ) ? stripslashes( $role[ $message_key ] ) : '';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
foreach ( $args as $k => $v ) {
|
||||
@@ -676,7 +674,7 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
|
||||
extract( $args, EXTR_SKIP );
|
||||
|
||||
//not display on admin preview
|
||||
if ( empty( $_POST['act_id'] ) || $_POST['act_id'] != 'um_admin_preview_form' ) {
|
||||
if ( empty( $_POST['act_id'] ) || sanitize_key( $_POST['act_id'] ) !== 'um_admin_preview_form' ) {
|
||||
|
||||
$enable_loggedin_registration = apply_filters( 'um_registration_for_loggedin_users', false, $args );
|
||||
|
||||
@@ -1266,7 +1264,7 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
|
||||
|
||||
$hash = UM()->member_directory()->get_directory_hash( $directory_id );
|
||||
|
||||
$query[ 'search_' . $hash ] = ! empty( $_GET[ 'search_' . $hash ] ) ? $_GET[ 'search_' . $hash ] : '';
|
||||
$query[ 'search_' . $hash ] = ! empty( $_GET[ 'search_' . $hash ] ) ? sanitize_text_field( $_GET[ 'search_' . $hash ] ) : '';
|
||||
}
|
||||
|
||||
if ( empty( $query ) ) {
|
||||
|
||||
Reference in New Issue
Block a user