Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A void function must not return a value #86

Closed
jookk opened this issue Aug 30, 2019 · 2 comments
Closed

A void function must not return a value #86

jookk opened this issue Aug 30, 2019 · 2 comments

Comments

@jookk
Copy link

jookk commented Aug 30, 2019

Steps to reproduce

try to create new user without or with password
try to change password

Expected behaviour

User is created, link to activate account is sent

Actual behaviour

user not created, password not accepted, not changed

[PHP] Error: A void function must not return a value at /var/www/nextcloud/apps/password_policy/lib/Validator/HIBPValidator.php#71

[ocs_api] Warning: OC\HintException: Password needs to contain at least one numeric character at

Server configuration detail

Operating system: Linux 4.19.0-5-amd64 nextcloud/server#1 SMP Debian 4.19.37-5+deb10u2 (2019-08-08) x86_64

Webserver: Apache (fpm-fcgi)

Database: mysql 10.3.15

PHP version:

7.3.4-2
Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, sodium, standard, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, gd, gettext, gmp, iconv, imagick, intl, json, exif, mysqli, pdo_mysql, pgsql, apc, posix, readline, shmop, SimpleXML, smbclient, soap, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlrpc, xmlwriter, xsl, zip, Phar, libsmbclient, Zend OPcache

Nextcloud version: 17.0.0 Beta 3 - 17.0.0.5

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: upgraded from 16.0.4

Signing status

Array
(
[text] => Array
(
[EXTRA_FILE] => Array
(
[.github/pull_request_template.md] => Array
(
[expected] =>
[current] => 9307a7ab3b06266ccda57e66ae678b31db3faf26a51c508d60b9bc2874ed59d46bcd1c1d07970e2af0947f826f050f953cbf02a962a4b40cb1572f5fcd8f94a1
)

                [.github/ISSUE_TEMPLATE/Bug_report.md] => Array
                    (
                        [expected] => 
                        [current] => 2a574514bba022a69c723616091bfd19eb5b4821aef95846eb942e90ee80cf2b2b8710091660fc99b43eb922b47d96f89b4e38c72d14909d76a9c88edbe7a28b
                    )

                [.github/ISSUE_TEMPLATE/Feature_request.md] => Array
                    (
                        [expected] => 
                        [current] => 84541137d4035e61148e33f0560e8f96c2dffde247b672459cf45f32c57bcfb6a4479dcf9c45b6598e95f61369bfad2d16c7784d59a689ad46c7b332216f891b
                    )

                [package-lock.json] => Array
                    (
                        [expected] => 
                        [current] => 851dfbb766522728bdb6b468b02e4f3bd8a5f481c1ce89c7d151764b8ec0c35344032d771b8bb94b3e99f6e625c580c41eb3e480166d165731039f6de2e002c4
                    )

                [README.md] => Array
                    (
                        [expected] => 
                        [current] => ec0ad73e49149bc6200d8b07cc14a6795936d6c150ad20d30c9d694ea6ebe4b4738f81fc50d1f84d68d0c62e045f1b854ab56a1264b9310aadb2aa54a7573194
                    )

                [.tx/config] => Array
                    (
                        [expected] => 
                        [current] => 80dfc72f84d02213d63b236925f020fc21f17fc5d1964cd84c0530fb65f3738cd03ff923f50ba8396d5832f5a04276891733281ecba82321cb426f13aa968516
                    )

                [l10n/.gitkeep] => Array
                    (
                        [expected] => 
                        [current] => cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
                    )

                [.gitattributes] => Array
                    (
                        [expected] => 
                        [current] => da176baa1edf0a8408ffa35e07849a980e68fe0dd5f53569e583aec2e362f61d47e1ff6968d2fd92787b59ee2f8f38cbe8dcdde7e3ef1e24081cd21dc61e1d30
                    )

                [.l10nignore] => Array
                    (
                        [expected] => 
                        [current] => 3a07b78d317a75ec5a027b869771b5464be4749f645e8e9e1999864c710ce5b115279bd159758addcf0bcd182e28da35da0156c5ff43af69bb869e5225818f98
                    )

                [.eslintrc.js] => Array
                    (
                        [expected] => 
                        [current] => 74262fe75f2c990b21f1116e86083b5ec635a084a3c3cba8ef7cf62f6ea398ed5f1b94c770a230993273a7bd2ff1587106b778814331e4bf6c0e20b82340bc94
                    )

                [package.json] => Array
                    (
                        [expected] => 
                        [current] => fec4073b810d23b3b314e58c1ba6c40f12f429fb623998685d65f93e5afc45f7ddc91d8467e905b00536c091ed3f5395b054f01df8d2f0dd6d213442d1241b11
                    )

            )

    )

[phonetrack] => Array
    (
        [INVALID_HASH] => Array
            (
                [lib/Notification/Notifier.php] => Array
                    (
                        [expected] => 506b285f467e6ea95f81b071e9f59ae81121ddfe26d9d0d09f2473ff1f9e4252daf4b6ac713797bd8abd08040ee67d8f8b35513220b55d7f1b253c7d1d8520b2
                        [current] => ee248451e1e3a3ab659243f0e03556d5544aa2f6d34d3c46764daaf354b7657901a00dd9d87f209afef0064582968a81277e0cc8fd1f601546268b2239605942
                    )

            )

    )

)

List of activated apps
Enabled:
 - accessibility: 1.3.0
 - activity: 2.10.1
 - apporder: 0.7.1
 - bruteforcesettings: 1.4.0
 - calendar: 1.7.0
 - cloud_federation_api: 1.0.0
 - comments: 1.7.0
 - contacts: 3.1.3
 - dav: 1.13.0
 - federatedfilesharing: 1.7.0
 - federation: 1.7.0
 - files: 1.12.0
 - files_external: 1.8.0
 - files_pdfviewer: 1.6.0
 - files_rightclick: 0.15.1
 - files_sharing: 1.9.0
 - files_trashbin: 1.7.0
 - files_versions: 1.10.0
 - files_videoplayer: 1.6.0
 - firstrunwizard: 2.6.0
 - gallery: 18.4.0
 - issuetemplate: 0.5.0
 - logreader: 2.2.0
 - lookup_server_connector: 1.5.0
 - news: 14.0.0-alpha0
 - nextcloud_announcements: 1.6.0
 - notes: 3.0.1
 - notifications: 2.5.0
 - oauth2: 1.5.0
 - ocdownloader: 1.7.2
 - password_policy: 1.7.0
 - phonetrack: 0.5.3
 - piwik: 0.5.3
 - privacy: 1.1.0
 - provisioning_api: 1.7.0
 - recommendations: 0.5.0
 - serverinfo: 1.7.0
 - sharebymail: 1.7.0
 - sharerenamer: 2.7.0
 - spreed: 7.0.0-beta.1
 - support: 1.0.1
 - suspicious_login: 2.0.1
 - text: 1.1.0
 - theming: 1.8.0
 - twofactor_backupcodes: 1.6.0
 - twofactor_nextcloud_notification: 2.1.0
 - twofactor_totp: 4.0.0
 - updatenotification: 1.7.0
 - viewer: 1.1.0
 - workflowengine: 1.7.0
Disabled:
 - admin_audit
 - bookmarks
 - encryption
 - event_update_notification
 - files_downloadactivity
 - ransomware_protection
 - survey_client
 - systemtags
 - user_ldap

Configuration (config/config.php)
{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "domain.sk"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "overwrite.cli.url": "https:\/\/domain.sk",
    "dbtype": "mysql",
    "version": "17.0.0.5",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "defaultapp": "apporder",
    "memcache.local": "\\OC\\Memcache\\APCu",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpmode": "smtp",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "587",
    "maintenance": false,
    "theme": "",
    "log_type": "file",
    "logtimezone": "Europe\/Bratislava",
    "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
    "loglevel": 2,
    "updater.release.channel": "beta",
    "enabledPreviewProviders": [
        "OC\\Preview\\Image",
        "OC\\Preview\\MP3",
        "OC\\Preview\\TXT",
        "OC\\Preview\\MarkDown",
        "OC\\Preview\\Epub",
        "OC\\Preview\\PDF"
    ],
    "mail_sendmailmode": "smtp",
    "mail_smtpsecure": "tls",
    "mail_smtpauthtype": "LOGIN",
    "mail_smtpauth": 1,
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "app_install_overwrite": [
        "apporder",
        "piwik",
        "spreed",
        "calendar",
        "issuetemplate"
    ],
    "updater.secret": "***REMOVED SENSITIVE VALUE***"
}

Are you using external storage, if yes which one: smb

Are you using encryption:

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

Client configuration

Browser: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.42 Safari/537.36 Edg/77.0.235.15

Operating system: windows 10

Logs

Web server error log
Insert your web server log here 
Nextcloud log
[PHP] Error: A void function must not return a value at /var/www/nextcloud/apps/password_policy/lib/Validator/HIBPValidator.php#71

[ocs_api] Warning: OC\HintException: Password needs to contain at least one numeric character at <<closure>>

 0. /var/www/nextcloud/apps/password_policy/lib/PasswordValidator.php line 77
    OCA\Password_Policy\Validator\NumericCharacterValidator->validate("*** sensitive parameter replaced ***")
 1. /var/www/nextcloud/apps/password_policy/lib/AppInfo/Application.php line 49
    OCA\Password_Policy\PasswordValidator->validate("*** sensitive parameter replaced ***")
 2. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 212
    OCA\Password_Policy\AppInfo\Application->OCA\Password_Policy\AppInfo\{closure}("*** sensitive parameters replaced ***")
 3. /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 44
    Symfony\Component\EventDispatcher\EventDispatcher->doDispatch([Closure {},Closure {}], "*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 4. /var/www/nextcloud/lib/private/EventDispatcher/SymfonyAdapter.php line 59
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 5. /var/www/nextcloud/lib/private/User/Database.php line 134
    OC\EventDispatcher\SymfonyAdapter->dispatch("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 6. /var/www/nextcloud/lib/private/User/Manager.php line 352
    OC\User\Database->createUser("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 7. /var/www/nextcloud/lib/private/User/Manager.php line 306
    OC\User\Manager->createUserFromBackend("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***", OC\User\Database {})
 8. /var/www/nextcloud/apps/provisioning_api/lib/Controller/UsersController.php line 307
    OC\User\Manager->createUser("*** sensitive parameter replaced ***", "*** sensitive parameter replaced ***")
 9. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 166
    OCA\Provisioning_API\Controller\UsersController->addUser("*** sensitive parameters replaced ***")
10. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Provisioning ... {}, "addUser")
11. /var/www/nextcloud/lib/private/AppFramework/App.php line 126
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Provisioning ... {}, "addUser")
12. /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("OCA\\Provisioni ... r", "addUser", OC\AppFramework\ ... {}, {_route: "ocs.pr ... "})
13. <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({_route: "ocs.pr ... "})
14. /var/www/nextcloud/lib/private/Route/Router.php line 297
    undefinedundefinedcall_user_func(OC\AppFramework\ ... {}, {_route: "ocs.pr ... "})
15. /var/www/nextcloud/ocs/v1.php line 82
    OC\Route\Router->match("/ocsapp/cloud/users")
16. /var/www/nextcloud/ocs/v2.php line 24
    undefinedundefinedrequire_once("/var/www/nextcloud/ocs/v1.php")

POST /ocs/v2.php/cloud/users


Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...
@kesselb kesselb transferred this issue from nextcloud/server Aug 30, 2019
@kesselb kesselb added this to the Nextcloud 17 milestone Aug 30, 2019
@kesselb kesselb changed the title nc17b3 feedback hipb A void function must not return a value Aug 30, 2019
@kesselb kesselb changed the title hipb A void function must not return a value A void function must not return a value Aug 30, 2019
@kesselb
Copy link
Contributor

kesselb commented Aug 30, 2019

Thanks for reporting 👍 Moved the issue to the right repository and changed the title. The password you're trying to set is listed at have i been powned btw ;)

@rullzer 🍪

@rullzer
Copy link
Member

rullzer commented Aug 30, 2019

You are right. A leftover of the refactoring. Fixed now and will be fixed in beta4

@rullzer rullzer closed this as completed Aug 30, 2019
@jookk jookk mentioned this issue Sep 5, 2019
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants