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

Guest user cannot be created #679

Closed
tobiasKaminsky opened this issue Oct 22, 2024 · 0 comments · Fixed by #680
Closed

Guest user cannot be created #679

tobiasKaminsky opened this issue Oct 22, 2024 · 0 comments · Fixed by #680

Comments

@tobiasKaminsky
Copy link
Member

  1. use our daily LTD
  2. try to invite a guest user
  3. see:
{
  "reqId": "WFF07dGsMTV4rqESKfDq",
  "level": 3,
  "time": "2024-10-22T12:17:04+00:00",
  "remoteAddr": "2a02:8071:64e0:7bc0:2f86:72c1:6a64:1cb5",
  "user": "admin",
  "app": "no app in context",
  "method": "PUT",
  "url": "/ocs/v2.php/apps/guests/api/v1/users",
  "message": "assert(is_array($commonPasswords)) in file '/var/www/html/apps/password_policy/lib/Validator/CommonPasswordsValidator.php' line 36",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0",
  "version": "31.0.0.3",
  "exception": {
    "Exception": "Exception",
    "Message": "assert(is_array($commonPasswords)) in file '/var/www/html/apps/password_policy/lib/Validator/CommonPasswordsValidator.php' line 36",
    "Code": 1,
    "Trace": [
      {
        "file": "/var/www/html/lib/private/AppFramework/App.php",
        "line": 161,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Guests\\Controller\\UsersController"
          },
          "create"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Route/Router.php",
        "line": 306,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\Guests\\Controller\\UsersController",
          "create",
          {
            "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
          },
          {
            "_route": "ocs.guests.users.create"
          }
        ]
      },
      {
        "file": "/var/www/html/ocs/v1.php",
        "line": 49,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/ocsapp/apps/guests/api/v1/users"
        ]
      },
      {
        "file": "/var/www/html/ocs/v2.php",
        "line": 7,
        "args": [
          "/var/www/html/ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
    "Line": 146,
    "Previous": {
      "Exception": "AssertionError",
      "Message": "assert(is_array($commonPasswords))",
      "Code": 1,
      "Trace": [
        {
          "file": "/var/www/html/apps/password_policy/lib/Validator/CommonPasswordsValidator.php",
          "line": 36,
          "function": "assert",
          "args": [
            false,
            "assert(is_array($commonPasswords))"
          ]
        },
        {
          "file": "/var/www/html/apps/password_policy/lib/PasswordValidator.php",
          "line": 60,
          "function": "validate",
          "class": "OCA\\Password_Policy\\Validator\\CommonPasswordsValidator",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/apps/password_policy/lib/Listener/ValidatePasswordPolicyEventListener.php",
          "line": 32,
          "function": "validate",
          "class": "OCA\\Password_Policy\\PasswordValidator",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/lib/private/EventDispatcher/ServiceEventListener.php",
          "line": 68,
          "function": "handle",
          "class": "OCA\\Password_Policy\\Listener\\ValidatePasswordPolicyEventListener",
          "type": "->",
          "args": [
            {
              "__class__": "OCP\\Security\\Events\\ValidatePasswordPolicyEvent"
            }
          ]
        },
        {
          "file": "/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
          "line": 220,
          "function": "__invoke",
          "class": "OC\\EventDispatcher\\ServiceEventListener",
          "type": "->",
          "args": [
            {
              "__class__": "OCP\\Security\\Events\\ValidatePasswordPolicyEvent"
            },
            "OCP\\Security\\Events\\ValidatePasswordPolicyEvent",
            {
              "__class__": "Symfony\\Component\\EventDispatcher\\EventDispatcher"
            }
          ]
        },
        {
          "file": "/var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
          "line": 56,
          "function": "callListeners",
          "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
          "type": "->",
          "args": [
            [
              {
                "__class__": "Closure"
              }
            ],
            "OCP\\Security\\Events\\ValidatePasswordPolicyEvent",
            {
              "__class__": "OCP\\Security\\Events\\ValidatePasswordPolicyEvent"
            }
          ]
        },
        {
          "file": "/var/www/html/lib/private/EventDispatcher/EventDispatcher.php",
          "line": 67,
          "function": "dispatch",
          "class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
          "type": "->",
          "args": [
            {
              "__class__": "OCP\\Security\\Events\\ValidatePasswordPolicyEvent"
            },
            "OCP\\Security\\Events\\ValidatePasswordPolicyEvent"
          ]
        },
        {
          "file": "/var/www/html/lib/private/EventDispatcher/EventDispatcher.php",
          "line": 79,
          "function": "dispatch",
          "class": "OC\\EventDispatcher\\EventDispatcher",
          "type": "->",
          "args": [
            "OCP\\Security\\Events\\ValidatePasswordPolicyEvent",
            {
              "__class__": "OCP\\Security\\Events\\ValidatePasswordPolicyEvent"
            }
          ]
        },
        {
          "file": "/var/www/html/apps/guests/lib/UserBackend.php",
          "line": 96,
          "function": "dispatchTyped",
          "class": "OC\\EventDispatcher\\EventDispatcher",
          "type": "->",
          "args": [
            {
              "__class__": "OCP\\Security\\Events\\ValidatePasswordPolicyEvent"
            }
          ]
        },
        {
          "file": "/var/www/html/lib/private/User/Manager.php",
          "line": 446,
          "function": "createUser",
          "class": "OCA\\Guests\\UserBackend",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/apps/guests/lib/GuestManager.php",
          "line": 78,
          "function": "createUserFromBackend",
          "class": "OC\\User\\Manager",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/apps/guests/lib/Controller/UsersController.php",
          "line": 139,
          "function": "createGuest",
          "class": "OCA\\Guests\\GuestManager",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 208,
          "function": "create",
          "class": "OCA\\Guests\\Controller\\UsersController",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 114,
          "function": "executeController",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            {
              "__class__": "OCA\\Guests\\Controller\\UsersController"
            },
            "create"
          ]
        },
        {
          "file": "/var/www/html/lib/private/AppFramework/App.php",
          "line": 161,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->",
          "args": [
            {
              "__class__": "OCA\\Guests\\Controller\\UsersController"
            },
            "create"
          ]
        },
        {
          "file": "/var/www/html/lib/private/Route/Router.php",
          "line": 306,
          "function": "main",
          "class": "OC\\AppFramework\\App",
          "type": "::",
          "args": [
            "OCA\\Guests\\Controller\\UsersController",
            "create",
            {
              "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
            },
            {
              "_route": "ocs.guests.users.create"
            }
          ]
        },
        {
          "file": "/var/www/html/ocs/v1.php",
          "line": 49,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "->",
          "args": [
            "/ocsapp/apps/guests/api/v1/users"
          ]
        },
        {
          "file": "/var/www/html/ocs/v2.php",
          "line": 7,
          "args": [
            "/var/www/html/ocs/v1.php"
          ],
          "function": "require_once"
        }
      ],
      "File": "/var/www/html/apps/password_policy/lib/Validator/CommonPasswordsValidator.php",
      "Line": 36
    },
    "message": "assert(is_array($commonPasswords)) in file '/var/www/html/apps/password_policy/lib/Validator/CommonPasswordsValidator.php' line 36",
    "exception": {},
    "CustomMessage": "assert(is_array($commonPasswords)) in file '/var/www/html/apps/password_policy/lib/Validator/CommonPasswordsValidator.php' line 36"
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant