Admin user with language "en@pirate" can't access Admin page #24545

Closed
michaelstingl opened this Issue May 10, 2016 · 4 comments

Projects

None yet

5 participants

@michaelstingl

Steps to reproduce

  1. Set user language "en@pirate"
  2. Open http://example.com/settings/admin

Expected behaviour

Admin page should be accessible, even for pirates.

Actual behaviour

Full page error:

Internal Server Error
The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

Technical details
Remote Address: xxx.xx.x.x
Request ID: g6WdFgmL3f+tHUWD/GmD

Server configuration

Operating system:
debian:jessie

Web server:
apache

Database:
SQLite 3

PHP version:
5.6

ownCloud version: (see ownCloud admin page)
{"installed":true,"maintenance":false,"version":"9.0.1.3","versionstring":"9.0.1","edition":""}

Updated from an older ownCloud or fresh install:
fresh install

Where did you install ownCloud from:
https://hub.docker.com/_/owncloud/

Signing status (ownCloud 9.0 and above):

No errors have been found.

List of activated apps:

Enabled:
  - activity: 2.2.1
  - comments: 0.2
  - dav: 0.1.6
  - federatedfilesharing: 0.1.0
  - federation: 0.0.4
  - files: 1.4.4
  - files_pdfviewer: 0.8
  - files_sharing: 0.9.1
  - files_texteditor: 2.1
  - files_trashbin: 0.8.0
  - files_versions: 1.2.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 14.5.0
  - notifications: 0.2.3
  - provisioning_api: 0.4.1
  - systemtags: 0.2
  - templateeditor: 0.1
  - updatenotification: 0.1.0
Disabled:
  - encryption
  - external
  - files_external
  - user_external
  - user_ldap

The content of config/config.php:

{
    "system": {
        "instanceid": "ochti2wesu05",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost:9080"
        ],
        "datadirectory": "\/var\/www\/html\/data",
        "overwrite.cli.url": "http:\/\/localhost:9080",
        "dbtype": "sqlite3",
        "version": "9.0.1.3",
        "logtimezone": "UTC",
        "installed": true
    }
}

Are you using external storage, if yes which one: local/smb/sftp/...
no

Are you using encryption: yes/no
no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no

Client configuration

Browser:
Chrome 50

Operating system:
Mac OS X 10.11.4

Logs

ownCloud log (data/owncloud.log)

{"reqId":"A0n+WPW+rAAGjN/6AxrM","remoteAddr":"172.17.0.1","app":"index","message":"Exception: {\"Exception\":\"Punic\Exception\InvalidLocale\",\"Message\":\"'en@pirate' is not a valid locale identifier\",\"Code\":10001,\"Trace\":\"
#0 /var/www/html/3rdparty/punic/punic/code/Data.php(503): Punic\Data::getLocaleAlternatives('en@pirate')\
n#1 /var/www/html/3rdparty/punic/punic/code/Data.php(142): Punic\Data::getLocaleFolder('en@pirate')\
n#2 /var/www/html/3rdparty/punic/punic/code/Calendar.php(743): Punic\Data::get('calendar', 'en@pirate')\
n#3 /var/www/html/lib/private/l10n/l10n.php(148): Punic\Calendar::getDateFormat('short', 'en@pirate')\
n#4 /var/www/html/core/js/config.php(78): OC\L10N\L10N->l('jsdate', NULL)\
n#5 /var/www/html/lib/private/route/route.php(154) : runtime-created function(1): require_once('/var/www/html/c...')\
n#6 [internal function]: __lambda_func(Array)\
n#7 /var/www/html/lib/private/route/router.php(276): call_user_func('\x00lambda_241', Array)\
n#8 /var/www/html/lib/base.php(882): OC\Route\Router->match('/core/js/oc.js')\
n#9 /var/www/html/index.php(39): OC::handleRequest()\
n#10 {main}\",\"File\":\"/var/www/html/3rdparty/punic/punic/code/Data.php\",\"Line\":531}","level":3,"time":"2016-05-10T15:44:48+00:00","method":"GET","url":"/core/js/oc.js?v=f474051010667eafc3e139228b8e9c48","user":"user"}

{"reqId":"gL6TAWcQi3uH+u+YdNkf","remoteAddr":"172.17.0.1","app":"index","message":"Exception: {\"Exception\":\"Punic\Exception\InvalidLocale\",\"Message\":\"'en@pirate' is not a valid locale identifier\",\"Code\":10001,\"Trace\":\"
#0 /var/www/html/3rdparty/punic/punic/code/Data.php(503): Punic\Data::getLocaleAlternatives('en@pirate')\
n#1 /var/www/html/3rdparty/punic/punic/code/Data.php(142): Punic\Data::getLocaleFolder('en@pirate')\
n#2 /var/www/html/3rdparty/punic/punic/code/Calendar.php(834): Punic\Data::get('calendar', 'en@pirate')\
n#3 /var/www/html/3rdparty/punic/punic/code/Calendar.php(1121): Punic\Calendar::getDatetimeFormatReal('long|medium', 'en@pirate', '')\
n#4 /var/www/html/lib/private/l10n/l10n.php(167): Punic\Calendar::formatDatetime(Object(DateTime), 'long|medium', 'en@pirate')\
n#5 /var/www/html/lib/private/datetimeformatter.php(278): OC\L10N\L10N->l('datetime', Object(DateTime), Array)\
n#6 /var/www/html/lib/private/datetimeformatter.php(239): OC\DateTimeFormatter->format('1462894735.9508', 'datetime', 'long|medium', NULL, NULL)\
n#7 /var/www/html/apps/updatenotification/controller/admincontroller.php(88): OC\DateTimeFormatter->formatDateTime('1462894735.9508')\
n#8 /var/www/html/apps/updatenotification/admin.php(25): OCA\UpdateNotification\Controller\AdminController->displayPanel()\
n#9 /var/www/html/lib/private/app.php(700): include('/var/www/html/a...')\
n#10 /var/www/html/settings/admin.php(160): OC_App::getForms('admin')\
n#11 /var/www/html/lib/private/route/route.php(154) : runtime-created function(1): require_once('/var/www/html/s...')\
n#12 [internal function]: __lambda_func(Array)\
n#13 /var/www/html/lib/private/route/router.php(276): call_user_func('\x00lambda_215', Array)\
n#14 /var/www/html/lib/base.php(882): OC\Route\Router->match('/settings/admin')\
n#15 /var/www/html/index.php(39): OC::handleRequest()\
n#16 {main}\",\"File\":\"/var/www/html/3rdparty/punic/punic/code/Data.php\",\"Line\":531}","level":3,"time":"2016-05-10T15:44:51+00:00","method":"GET","url":"/settings/admin","user":"user"}
@LukasReschke
Member

I propose to kill the language instead of adding hacks for a joke...

@karlitschek @DeepDiver1975 Objections?

@karlitschek
Member

hell yes!! ๐Ÿ‘

@DeepDiver1975 DeepDiver1975 added this to the 9.1-current milestone May 11, 2016
@DeepDiver1975 DeepDiver1975 self-assigned this May 11, 2016
@DeepDiver1975 DeepDiver1975 added the bug label May 11, 2016
@DeepDiver1975
Member

Pirate english just got killed o tranisfex

@DeepDiver1975 DeepDiver1975 added a commit to owncloud/administration that referenced this issue May 11, 2016
@DeepDiver1975 DeepDiver1975 We drop pirate english a4f1961
@MorrisJobke
Member

@michaelstingl Backported to all stable versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment