traccar: SMS Sending error in 6.5
Hi,
continuing from the forum thread: https://www.traccar.org/forums/topic/sms-notification-errorafter-upgrade-to-65-version/page/
The problem is that the constructed JSON (for some reason) inserts another newline (unescaped) at the end of “message” - and this is then invalid JSON and fails with most parsers ( "Test message\n ) in below example:
‘{\n’ ’ “to”: “+1234”,\n’ ’ “message”: “Test message\n’ '”\n’ ’ }’
(this is a line by line representation of what gets posted quoted with single quotes).
Not entirely sure why this is happening after the upgrade, it for sure did not happen before. Will continue debugging.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (14 by maintainers)
Fixed in https://github.com/traccar/traccar/commit/66b538f03690c34eae6c74086207b472e8f5c55c and https://github.com/traccar/traccar/commit/f53d4c24cd7cc4b7cbd3bd043f8d1e95c72d24e4.
Yes sorry, I meant escape the json values, not the entire payload.
https://github.com/traccar/traccar/issues/5402#issuecomment-2362293674