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

user_lang input not checked during registration

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.0.6
    • Fix Version/s: 3.0.9-RC1
    • Component/s: None
    • Labels:
      None

      Description

      Someone was able to register on my site with en_us language selected (caught it by another error thrown but verified it in the db), but the language pack isn't installed.

        Issue Links

          Activity

          Hide
          A_Jelly_Doughnut A_Jelly_Doughnut added a comment -

          Working on a patch...

          Show
          A_Jelly_Doughnut A_Jelly_Doughnut added a comment - Working on a patch...
          Hide
          nickvergessen Joas Schilling added a comment -

          validate_config_vars in adm/index (olympus) and incldues/functions_acp (ascraeus) has a little check for that aswell and should probably use the function aswell

          			// Absolute path
          			case 'lang':
          				if (!$cfg_array[$config_name])
          				{
          					break;
          				}
           
          				$cfg_array[$config_name] = basename($cfg_array[$config_name]);
           
          				if (!file_exists($phpbb_root_path . 'language/' . $cfg_array[$config_name] . '/'))
          				{
          					$error[] = $user->lang['WRONG_DATA_LANG'];
          				}
          			break;

          Show
          nickvergessen Joas Schilling added a comment - validate_config_vars in adm/index (olympus) and incldues/functions_acp (ascraeus) has a little check for that aswell and should probably use the function aswell // Absolute path case 'lang': if (!$cfg_array[$config_name]) { break; }   $cfg_array[$config_name] = basename($cfg_array[$config_name]);   if (!file_exists($phpbb_root_path . 'language/' . $cfg_array[$config_name] . '/')) { $error[] = $user->lang['WRONG_DATA_LANG']; } break;
          Hide
          Oleg Oleg [X] (Inactive) added a comment -

          Without the patch I was unable to change my language to anything other than british english (default qi install). I tried 'xx', 'xxxx', 'de', 'en_us', mostly in ucp but I tried registration once also. In all cases the operation succeeded and I was back to british english.

          With the patch applied ucp produces an error if I attempt to specify a bogus language.

          Show
          Oleg Oleg [X] (Inactive) added a comment - Without the patch I was unable to change my language to anything other than british english (default qi install). I tried 'xx', 'xxxx', 'de', 'en_us', mostly in ucp but I tried registration once also. In all cases the operation succeeded and I was back to british english. With the patch applied ucp produces an error if I attempt to specify a bogus language.
          Hide
          bantu Andreas Fischer added a comment - - edited

          nn-: You can change language to "de" without the patch, when only "en" is installed but "de" is also on file system.

          Show
          bantu Andreas Fischer added a comment - - edited nn-: You can change language to "de" without the patch, when only "en" is installed but "de" is also on file system.
          Hide
          bantu Andreas Fischer added a comment - - edited

          Without the patch, you can change user_lang (the database field) to whatever you want, but user::setup() checks whether user_lang exists on file system and silently falls back to default (and/or en) if it does not exist. That's probably why you didn't notice.

          Show
          bantu Andreas Fischer added a comment - - edited Without the patch, you can change user_lang (the database field) to whatever you want, but user::setup() checks whether user_lang exists on file system and silently falls back to default (and/or en) if it does not exist. That's probably why you didn't notice.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development