chimera
chimera copied to clipboard
ROM shortcuts can't be deleted if there is a special character in game name
I uploaded a game ROM and gave it a name with a special character (eg. "é" or "à"). I could not delete the game later on via steam buddy. If I select "Delete" I get a web with an error as response: "Error: 500 Internal Server Error Sorry, the requested URL 'http://gameros-sbc.local/shortcuts/delete' caused an error: Internal Server Error"
Could you check out what the shortcut file is called? You can find it in ~/.local/share/steam-shortcuts/
somewhere
In steam-buddy.gbc.yaml I have (Pokémon. I tried different versions of entering the name):
- banner: "/home/gamer/.local/share/steam-buddy/banners/gbc/Pok\xE9mon Pinball.png"
cmd: gbc
dir: '"/home/gamer/.local/share/steam-buddy/content/gbc"'
hidden: false
name: "Pok\xE9mon Pinball"
params: "\"Pok\xE9mon Pinball.zip\""
tags:
- Game Boy Color
- banner: "/home/gamer/.local/share/steam-buddy/banners/gbc/Pok\xE9mon PB.png"
cmd: gbc
dir: '"/home/gamer/.local/share/steam-buddy/content/gbc"'
hidden: false
name: "Pok\xE9mon PB"
params: "\"Pok\xE9mon PB.zip\""
tags:
- Game Boy Color
In steam-buddy.gba.yaml I have ried with an "à" ("Tetrisà" to check for a different emulator and a different character):
- banner: "/home/gamer/.local/share/steam-buddy/banners/gba/Tetris\xE0.png"
cmd: gba
dir: '"/home/gamer/.local/share/steam-buddy/content/gba"'
hidden: false
name: "Tetris\xE0"
params: "\"Tetris\xE0.zip\""
tags:
- Game Boy Advance
That makes a lot of sense, thanks! I think I know how to fix this. We just need to use html.unescape
in some places.
@sharkwouter did you figure it out how to fix this?
I didn't test it, but you can probably just change this line: https://github.com/ChimeraOS/chimera/blob/202b75bc5d6537b61b0b4e502c7f025e4e924485/chimera_app/server.py#L195
To be the following:
name = html.unescape(name.strip())
That change might be needed in shortcut delete as well. Not sure, would need testing.
I think the solution is on urllib.parse.quote() function. Maybe https://github.com/ChimeraOS/chimera/pull/198 fixes this as well
Just retested. Issue still exists.