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

Subuser permissions sometimes get saved as an object instead of an array #5062

Open
3 tasks done
itsvic-dev opened this issue Apr 7, 2024 · 1 comment
Open
3 tasks done
Labels
bug Something that's not working as it's intended to be.

Comments

@itsvic-dev
Copy link

Current Behavior

As is said in the title.
image

Expected Behavior

Subuser permissions should be an array.

Steps to Reproduce

  1. Invite a subuser.
  2. Fiddle around with the permissions for a while, saving multiple times.
  3. Hopefully after a while you get the following error, and the permissions attribute becomes an object.
Uncaught TypeError: subuser.permissions.filter is not a function

image

Panel Version

1.11.5

Wings Version

1.11.11

Games and/or Eggs Affected

No response

Docker Image

No response

Error Logs

No response

Is there an existing issue for this?

  • I have searched the existing issues before opening this issue.
  • I have provided all relevant details, including the specific game and Docker images I am using if this issue is related to running a server.
  • I have checked in the Discord server and believe this is a bug with the software, and not a configuration issue with my specific system.
@itsvic-dev itsvic-dev added the not confirmed Report seems plausible but requires additional testing or 3rd part confirmation. label Apr 7, 2024
@VibeGAMESNL
Copy link
Contributor

VibeGAMESNL commented May 16, 2024

We experience the same issue. Resulting in this error:

image

Wings log:

ERROR: [May 16 13:25:34.620] error processing websocket event "auth" error=json: cannot unmarshal object into Go struct field WebsocketPayload.permissions of type []string error_identifier=4c036e43-86c2-4852-8f78-8946f03f18ce event=auth server=23136c52-f6ba-401e-aebd-460284996d92

Stacktrace:
json: cannot unmarshal object into Go struct field WebsocketPayload.permissions of type []string
github.com/apex/log.(*Entry).Errorf
        /root/go/pkg/mod/github.com/apex/log@v1.9.0/entry.go:132
github.com/pterodactyl/wings/router/websocket.(*Handler).SendErrorJson
        /root/wings/wings/router/websocket/websocket.go:246
github.com/pterodactyl/wings/router.getServerWebsocket.func3
        /root/wings/wings/router/router_server_ws.go:86
runtime.goexit
        /usr/local/go/src/runtime/asm_amd64.s:1695

Database records where you can see some permission fields are objets and some arrays:
image

@matthewpi matthewpi added bug Something that's not working as it's intended to be. and removed not confirmed Report seems plausible but requires additional testing or 3rd part confirmation. labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that's not working as it's intended to be.
Projects
Status: 📋 Backlog
Development

No branches or pull requests

3 participants