Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-9478

Validate maximum number of allowed recipients per PM value

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.x
    • Fix Version/s: 3.0.8-RC1
    • Component/s: Other
    • Labels:
      None

      Description

      I just logged on to my ACP and tried to set a high value (99999999999999999999..) for

      Maximum number of allowed recipients per private message:
      The maximum number of allowed recipients in a private message. If 0 is entered, the board-wide setting is used.

      in User and Groups -> Groups -> Manage Groups -> Administrator

      It gave me this error =
      Warning: error_log() [function.error-log]: Filename cannot be empty in /home/xxxxx/public_html/includes/functions.php on line 3467

      --------------------

      General Error
      SQL ERROR [ mysqli ]

      Out of range value adjusted for column 'group_max_recipients' at row 1 [1264]

      SQL

      UPDATE nsbase_groups SET group_name = 'ADMINISTRATORS', group_desc = 'NS', group_desc_uid = '', group_desc_bitfield = '', group_type = 3, group_desc_options = 7, group_max_recipients = 9999999999 WHERE group_id = 5

      BACKTRACE

      FILE: includes/db/mysqli.php
      LINE: 163
      CALL: dbal->sql_error()

      FILE: includes/functions_user.php
      LINE: 2587
      CALL: dbal_mysqli->sql_query()

      FILE: includes/acp/acp_groups.php
      LINE: 433
      CALL: group_create()

      FILE: includes/functions_module.php
      LINE: 507
      CALL: acp_groups->main()

      FILE: adm/index.php
      LINE: 78
      CALL: p_master->load_active()

      ------------------

      Hope it will be fixed

        Activity

        Hide
        bantu Andreas Fischer added a comment -

        Trying to set a high value gives me an SQL error.

        Out of range value for column 'group_max_recipients' at row 1 [1264]

        Show
        bantu Andreas Fischer added a comment - Trying to set a high value gives me an SQL error. Out of range value for column 'group_max_recipients' at row 1 [1264]
        Hide
        prototech prototech added a comment -

        The maxlength attribute value needs to be decreased. It's currently 10. The general private message settings use 5.

        Show
        prototech prototech added a comment - The maxlength attribute value needs to be decreased. It's currently 10. The general private message settings use 5.
        Hide
        bantu Andreas Fischer added a comment - - edited

        I think that GROUP_MAX_RECIPIENTS_EXPLAIN shouldn't be edited. The limit of 16777215 is so high, noone should ever hit it in real life. Thus, telling the limit to the user beforehand doesn't really make sense in my opinion. - A_Jelly_Donut and naderman agreed as well.

        Show
        bantu Andreas Fischer added a comment - - edited I think that GROUP_MAX_RECIPIENTS_EXPLAIN shouldn't be edited. The limit of 16777215 is so high, noone should ever hit it in real life. Thus, telling the limit to the user beforehand doesn't really make sense in my opinion. - A_Jelly_Donut and naderman agreed as well.
        Hide
        bantu Andreas Fischer added a comment -

        We should probably also declare a callback function for what the preg_replace() does and use preg_replace_callback() instead. Especially because that's used quite often.

        Show
        bantu Andreas Fischer added a comment - We should probably also declare a callback function for what the preg_replace() does and use preg_replace_callback() instead. Especially because that's used quite often.
        Hide
        rxu Ruslan Uzdenov added a comment -

        Sounds good. We use the trick to localize error messages in:
        acp_users.php - for 5 times;
        ucp_prefs.php - for 2 times;
        ucp_profile.php - for 4 times;
        ucp_register.php - for 1 time.

        I guess we should create a separate ticket for this task.

        Show
        rxu Ruslan Uzdenov added a comment - Sounds good. We use the trick to localize error messages in: acp_users.php - for 5 times; ucp_prefs.php - for 2 times; ucp_profile.php - for 4 times; ucp_register.php - for 1 time. I guess we should create a separate ticket for this task.
        Hide
        bantu Andreas Fischer added a comment -

        I've squashed all four commits together into one commit.

        Show
        bantu Andreas Fischer added a comment - I've squashed all four commits together into one commit.

          People

          • Assignee:
            rxu Ruslan Uzdenov
            Reporter:
            neonshares neonshares
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development