Fix/cpim handling from dryrun 1#99
Conversation
lua/index.lua's uriescape was mixed-style: it correctly escaped literal `+` to `%2B` (RFC 3986), but encoded whitespace as `+` (form-urlencoded). This created ambiguity since mod_curl decodes `%XX` but leaves `+` literal — both space-as-`+` and `+`-from-`%2B` arrived at PHP indistinguishable. outbound-hook.php's urldecode (form-urlencoded) then mangled all `+` to space, corrupting DB-stored Content-Type fields like `application/vnd.gsma.rcs-ft-http+xml` to `... xml` (literal space). Fix is coupled across both files: - lua/index.lua line 12: spaces → %20 (RFC 3986) instead of `+` - outbound-hook.php lines 32, 33, 40: rawurldecode (RFC 3986) instead of urldecode Both must change together — see comments in each file. Web UI branch is unaffected (frontend sends raw JSON, so rawurldecode is a no-op there and incidentally fixes a latent `+`-mangle bug for user-typed messages).
|
f3f4366 formalizes the code change that I am manually patching into webtexting.umd.js when deploying messaging to prod. The patching of that file is why I added a mechanism to invalidate caching of the old file by clients (I experienced this issue myself in firefox while testing) in cc40110. 2c17511 is a self contained fix necessary for text to be displayed properly (spaces instead of +) AND for mime types to be correctly stored in the database (+ instead of spaces). It was effectively mutually exclusive before the change. |
|
I am also not sure how the deploy pipeline for the js stuff works, so as long as the f3f4366 change ends up being wrapped up in whatever bundle replaces the patched version on the prod servers, everything is good. Note: none of this is in prod quite yet, as I have been doing testing and dry-runs of the runbook. I am probably going to aim for tuesday night for the actual deployment. |
|
I never got to understanding the git action around building the front end. I deploy by scp'ing the build files from my dev environment to prod |
Prior pull request was incomplete, as it was missing the corresponding lua encoding step. Both need to be updated simultaneously to be consistent with each other.