codeforpdx / PASS

PASS project - with HMIS module integration
MIT License
28 stars 25 forks source link

Update sendMessageTTL #365

Closed leekahung closed 1 year ago

leekahung commented 1 year ago

Bug Description: At the moment, sendMessageTTL generates new message slugs using the message title, the date object, and the ISO time. However, the initial part (the message title) is prone to having special characters or spaces inserted inside it that could make URLs unreadable. In the worst case, the container where this file exists (either Inbox or Outbox) could break as it attempts to grab the inaccessible file from it. These bugs are revealed recently in a recent PR (#330).

Possible Solution (optional): One solution to this is to process the message title with encodeURIComponent. That way, it'll always return a usable string for URLs. The replace function used to replace spaces with an underscore could also be removed with this approach.

leekahung commented 1 year ago

Issue resolved in PR #366. Closing issue.