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

User selection of an invalid style causes a general error

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.11, 3.1.0-dev
    • Fix Version/s: 3.1.0-b2
    • Component/s: Sessions
    • Labels:

      Description

      User selection of a style that is not installed causes a general error of "Could not get style data." This can easily happen if a mod allows the ability for users to select a custom style for a specific area or the users are allowed to specify their own styles via the style parameter (by a slight modification of the code).

      This could easily be avoided with the following change:
      // User has wrong style
      if (!$this->theme && $style == $this->data['user_style'])

      // User has wrong style
      if (!$this->theme)

      I can make a PR for this, but I'm not sure how it would be wanted since session.php was split into two files for 3.1. Should it be for develop-olympus and then be handled by whoever does the merge for 3.1?

        Activity

        Hide
        Oleg Oleg [X] (Inactive) added a comment -

        If the code is completely different for 3.0 and 3.1, please make two separate PRs and 3.0 diff will be reverted during merge to 3.1.

        Show
        Oleg Oleg [X] (Inactive) added a comment - If the code is completely different for 3.0 and 3.1, please make two separate PRs and 3.0 diff will be reverted during merge to 3.1.
        Hide
        nickvergessen Joas Schilling added a comment -

        Submitting the form with a style ID that does not exist, displayes:

        Your preferences have been updated.

        I guess it should throw an error instead.

        Show
        nickvergessen Joas Schilling added a comment - Submitting the form with a style ID that does not exist, displayes: Your preferences have been updated. I guess it should throw an error instead.
        Hide
        EXreaction EXreaction [X] (Inactive) added a comment -

        I'm not sure that's too much of an issue, they'd only get that if they are submitting invalid data on purpose.

        Show
        EXreaction EXreaction [X] (Inactive) added a comment - I'm not sure that's too much of an issue, they'd only get that if they are submitting invalid data on purpose.

          People

          • Assignee:
            EXreaction EXreaction [X] (Inactive)
            Reporter:
            EXreaction EXreaction [X] (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development