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

Newsflash message not properly escaped when populating the addevent form, may result in message being clipped #800

Open
carrythebanner opened this issue Aug 19, 2024 · 1 comment
Assignees

Comments

@carrythebanner
Copy link
Collaborator

As noted in #799 there looks to be some unexpected clipping of the newsflash message.

It seems that the initial value is saved to the database properly and also returned properly via retrieve_event. When the message is populated into the form, however, the string is assigned to the value attribute of an input and apparently not properly escaped.


$.fn.dateStatusesList = function() {

Example

Listing 11901 (calevent id) has 2 occurrences, 19594 and 19780 (caldaily ids).

The full newflash message should be:
Moved ride to today should be more acclimated to everyone's liking. I needed more time to acclimate to the heat before I did this with you guys..
… but only the portion up to the first quote mark (') is shown:
Moved ride to today should be more acclimated to everyone

Presumably, if the event were saved in this state, the truncated message would be sent to the server and the rest of the message would be lost.

newsflash

@ionous
Copy link
Contributor

ionous commented Aug 20, 2024

yeah, it looks like the reason that title, etc. are okay -- is because they go through mustache, and mustache has proper escaping.

buildSortedDatesListHTML() does it manually, without the escaping

            "<input ",
                            "type='text' ",
                            "class='newsflash' ",
                            "value='" + dateStatusNewsFlash,
                        "'>",

making the <li> a mustache template might be a decent fix

@carrythebanner carrythebanner self-assigned this Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants