Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-7792

Radio Button in CPF Admin - can cause SQL Error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 3.0.4
    • 3.0.x
    • ACP
    • None
    • PHP Environment:
      Database:

      Naderman says it’s a bug, so reporting it here...

      ACP -> Users and Groups -> Custom profile fields -> EDIT a field (only works in edit mode) --> Display profile field.

      If you use firebug to modify the value, you can generate an SQL Error (expecting integer, string input instead, or truncated data error) because request_var is setting the default value from the field in a query (this is why the bug can only occur in edit mode). The default value is a string instead of an int. The simple fix is to force (int) for the request_var.
      This is not a security issue because the variables are still passed through the insert query, which checks to see if a variable is a string, and if so runs through $db->sql_escape.

      CPF Patch sent to Chris includes the fix for this bug.

            Acyd Burn Meik Sievertsen [X] (Inactive)
            Highway of Life David Lewis [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: