Open Marshall-vak opened 3 days ago
Per your other issue, you should be able to resolve this by using another set of quotation marks wrapping the full name. E.g. ""New Name"/"
and ""š¦"/"
Does that not work?
Simply adding quotes doesn't work in this context: https://api.resonite.com/users/""š¦"\"?byUsername=true https://api.resonite.com/users/""New Name"\"?byUsername=true
Adding them to the other request makes that one not respond with anything aswell: https://api.resonite.com/users/?name=""š¦"\" https://api.resonite.com/users/?name=""New Name"\"
The quotes being the added need to be escaped to make a valid JSON.
{
"$schema": "https://raw.githubusercontent.com/Yellow-Dog-Man/JSONSchemas/main/schemas/HeadlessConfig.schema.json",
"loginCredential": "",
"loginPassword": "",
"startWorlds": [
{
"isEnabled": true,
"loadWorldPresetName": "Grid",
"defaultUserRoles": {
"\"\"š¦\"\\\"": "Admin",
"\"\"New Name\"\\\"": "Builder"
},
"autoInviteUsernames": ["\"š¦\"\\", "\"New Name\"\\"]
}
]
}
I am providing the full log but I will save you some time as it does not work.
User ""New Name"\" not found: NotFound
2e1e73f5-f2e8-4bcd-ac21-926d95b246ad - 2024.10.8.1349 - 2024-10-17 02_15_00.log
Describe the bug?
Certain usernames can not be looked up using the resonite API. This prevents users from getting default permissions on headless.
To Reproduce
First, get a username with a backslash in it #3084
Then create a headless and set yourself to have permissions on it by default. Be sure to escape the quotes and the backslash you have ended up getting in your username. In this case
"š¦"\
being my account and"New Name"\
being the test account created in the name change issue.Tada, it fails to give you permissions! But succeeds to invite the usernames to the session. Let's try looking up this username in the API to see if it exists: https://api.resonite.com/users/"š¦"\?byUsername=true https://api.resonite.com/users/"New Name"\?byUsername=true
This returns
Expected behavior
The username should be able to be looked up using the API therefore should be able to get default permissions on a headless.
Screenshots
Resonite Version Number
2024.10.8.1349
What Platforms does this occur on?
Linux, Windows
What headset if any do you use?
Headless
Log Files
Log was generated on a fresh installed headless with no mods using the following config file (credentials removed): Config.json
2e1e73f5-f2e8-4bcd-ac21-926d95b246ad - 2024.10.8.1349 - 2024-10-16 19_32_11.log
Additional Context
Although you can not lookup these usernames using: https://api.resonite.com/users/"š¦"\?byUsername=true https://api.resonite.com/users/"New Name"\?byUsername=true
You can look them up using: https://api.resonite.com/users/?name="š¦"\ https://api.resonite.com/users/?name="New Name"\
Reporters
Marshall_vak (mvak) NepuShiro (NepuShiro)