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

Some characters are now saved as escape sequences on BotName.json file #3301

Closed
8 tasks done
nolddor opened this issue Oct 5, 2024 · 0 comments · Fixed by #3302
Closed
8 tasks done

Some characters are now saved as escape sequences on BotName.json file #3301

nolddor opened this issue Oct 5, 2024 · 0 comments · Fixed by #3302
Labels
✨ Enhancement Issues marked with this label indicate further enhancements to the program, such as new features. 🟢 Low priority Issues marked with this label are actively being worked on if nothing serious is on the list. 🐍 Not a bug Issues marked with this label indicate that given behaviour is intended to happen - not a bug. 🙏 Wishlist Issues marked with this label are wishlisted. We'd like to make them happen but they're not crucial.

Comments

@nolddor
Copy link
Contributor

nolddor commented Oct 5, 2024

Checklist

ASF version

Latest pre-release

ASF variant

linux-x64

Bug description

Since long ago (probably when you moved from newtonsoft to stj) some characters on BotName.json property are modified by ASF upon running to their escape sequence counterparts.

As an example:

"CustomGamePlayedWhileIdle": "Exchanging Cards, Emotes & BGs..."
becomes
"CustomGamePlayedWhileIdle": "Exchanging Cards, Emotes \u0026 BGs..."

Expected behavior

Strings at BotName.json file for properties such as CustomGamePlayedWhileIdle or CustomGamePlayedWhileFarming should remain untouched with the original value the people enters.

Actual behavior

Strings at BotName.json file for properties such as CustomGamePlayedWhileIdle or CustomGamePlayedWhileFarming are escaped.

Steps to reproduce

  1. Ensure ASF is running
  2. Edit your BotName.json file
  3. Use the following property and value "CustomGamePlayedWhileIdle": "Exchanging Cards, Emotes & BGs..."
  4. Save your configuration file

Reopen your configuration file to check that now value for CustomGamePlayedWhileIdle contains escape sequences.

Possible reason/solution

Defaults behaviour of Std seems to escape characters, this is not the same for old serializer newtonsoft

Can you help us with this bug report?

Yes, I can help with the testing if required.

Full log.txt recorded during reproducing the problem

N/A

Global ASF.json config file

N/A

BotName.json config of all affected bot instances

N/A

Additional info

I'm not aware if changing back from escape sequences to regular characters comes with any security concern.
Please double check at your side and evaluate if it is possible to get back the old behaviour.

@nolddor nolddor added 🐛 Bug Issues marked with this label indicate unintended program behaviour that needs correction. 👀 Evaluation Issues marked with this label are currently being evaluated if they're going to be considered. labels Oct 5, 2024
@JustArchi JustArchi added ✨ Enhancement Issues marked with this label indicate further enhancements to the program, such as new features. 🐍 Not a bug Issues marked with this label indicate that given behaviour is intended to happen - not a bug. 🙏 Wishlist Issues marked with this label are wishlisted. We'd like to make them happen but they're not crucial. 🟢 Low priority Issues marked with this label are actively being worked on if nothing serious is on the list. and removed 🐛 Bug Issues marked with this label indicate unintended program behaviour that needs correction. 👀 Evaluation Issues marked with this label are currently being evaluated if they're going to be considered. labels Oct 5, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
✨ Enhancement Issues marked with this label indicate further enhancements to the program, such as new features. 🟢 Low priority Issues marked with this label are actively being worked on if nothing serious is on the list. 🐍 Not a bug Issues marked with this label indicate that given behaviour is intended to happen - not a bug. 🙏 Wishlist Issues marked with this label are wishlisted. We'd like to make them happen but they're not crucial.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants