-
Notifications
You must be signed in to change notification settings - Fork 2.3k
feat(cfx-ui): allow html in connecting status #3169
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
base: master
Are you sure you want to change the base?
feat(cfx-ui): allow html in connecting status #3169
Conversation
XSS? |
I was informed that FiveM already prevents script tags from being used, an additionally html is allowed in connection rejection for a long time (used by txAdmin mostly). I tried using those, and in fact didn’t succeed. |
Just to make sure, I have done some scenarios where an potential bad actor could abuse the HTML ability. Video of checking it out: |
Did you try the way how txAdmin format connection status message? |
I might have a problem of understanding what do you mean by your message. If it's about that they sanitize the ban reason, it doesn't matter because every other resource can reject the connection trying to use some XSS stuff, even though they seem to be already sanitized somewhere in between sending data from resource -> cfx-ui, which was proven by my example in #3169 (comment) |
Goal of this PR
Add support for using HTML code in connecting status e.g.
deferral.update()
, like rejection status can do (deferral.done()), allowing server developers to create more customized update statuses than Adaptive Cards can provide. (excluding inputs of course)....
How is this PR achieving the goal
PR is replacing current implementation of showing the status message, to one similar to rejection status.
...
This PR applies to the following area(s)
FiveM, RedM
...
Successfully tested on
Game builds: 3258, 3095
Platforms: Windows
Checklist
Fixes issues
Preview
I'm attaching a PoC of my change.