Skip to:
Content
Pages
Categories
Search
Top
Bottom

Sanitize Input – groups_update_groupmeta

  • Avatar of otterly
    otterly
    Participant

    @otterly

    Quick question regarding the groups_update_groupmeta function.

    Do we know if this sanitizes the input or is this something I’d have implement myself? I’m using this function to commit custom meta_values to the database for a custom plugin.

    I am updating meta_values from select box values and free-form text boxes. The select boxes aren’t a concern but the text boxes are.

    Just want to make sure I’m doing this correctly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    Easy enough to test with some ‘bad’ data, but groups_update_groupmeta uses update_metadata which runs the value thru things like sanitize_meta, so you should be fine.

    Avatar of otterly
    otterly
    Participant

    @otterly

    Perfect, I’ll do some testing of my own.

    I’m guessing that the BP crew hooked into the sanitize_meta function to do additional cleaning. I’ll familiarize myself with how groups_update_groupmeta works too.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.