Dear Kamailio Developers,
I am writing to report a potential bug in Kamailio's handling of base64 decoding when using the Lua scripting interface (app_lua).
It appears that base64 decoding behaves inconsistently between Lua scripts and kamailio.cfg.
When using `$(var(encoded_json){s.decode.base64t})` in kamailio.cfg, where $var(encoded_json) contains the encoded base64 string: `eyJmb28iOiJiYXIifQ` it decodes to the correct `{"foo":"bar"}`.
But when using the same transformation in Lua `KSR.xlog.xinfo("Decoded in Lua: ".. KSR.pv.get("$(var(encoded_json){s.decode.base64t})"))` it logs a corrupted encoded base64 string: `Decoded in Lua: ..]..#035z{b.?...#036..-....`
Thank you in advance for looking into this issue. Please let me know if you need additional details or test cases.
Kind regards,
Dbrcm