Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't write unfiltered POST data to database #8

Open
JustThomas opened this issue Mar 1, 2016 · 1 comment
Open

Don't write unfiltered POST data to database #8

JustThomas opened this issue Mar 1, 2016 · 1 comment
Milestone

Comments

@JustThomas
Copy link

Hi,

you have those lines in the function user_profile_field_save:

    if ( !isset( $_POST['ja_disable_user'] ) ) {
        $disabled = 0;
    } else {
        $disabled = $_POST['ja_disable_user'];
    }

    update_user_meta( $user_id, 'ja_disable_user', $disabled );

This writes the contents of $_POST['ja_disable_user'] directly to the database. You should avoid this and rather change the else block to

    } else {
        $disabled = 1;
    }
@jaredatch
Copy link
Owner

Yep, you are definitely right. I'll try to push an update out for this when I get time. Thanks for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants