The current code contains an unnecessary escape of the apostrophe within the sed command, causing apostrophes to not be XML encoded correctly. ( Current line 193)
Additionally, by unnecessary use of redirection, you're exposing the password to external processes. Internal bash functions should be used instead for /slightly/ more security.
Here's a quick example of the current (broken), a fixed version, and the internal-only code.
The current code contains an unnecessary escape of the apostrophe within the sed command, causing apostrophes to not be XML encoded correctly. ( Current line 193)
Additionally, by unnecessary use of redirection, you're exposing the password to external processes. Internal bash functions should be used instead for /slightly/ more security.
Here's a quick example of the current (broken), a fixed version, and the internal-only code.