SmartPack / SmartPack-Kernel-Manager

Source code of SmartPack-Kernel Manager, the Ultimate Tool to Manage your Kernel
https://play.google.com/store/apps/details?id=com.smartpack.kernelmanager.pro
GNU General Public License v3.0
629 stars 73 forks source link

Script manager serious bug #152

Open pchris7489 opened 1 year ago

pchris7489 commented 1 year ago

Hello,

There is a serious bug in script manager

  1. Create a new script
  2. Type in the script : echo 'hello world'
  3. Or type in the script : echo "hello world\n"
  4. Save the script

The bug : Smart Pack will absorb the quotes and the new line character, and the script will become either : echo hello world Or : echo "hello world "

Expected behavior : if you open this last saved script, you must see either : echo 'hello world' Or : echo "hello world\n"

This bug can bring serious boot loop issues if someone saves a script to modify kernel settin-s and this bugs shows up

sunilpaulmathew commented 1 year ago

@pchris7489 I'll have a look on it, though I still don't know how it bootloops (may be my because of my limited knowledge).

pchris7489 commented 1 year ago

Well the data passed to the kernel will be invalid.

This happens only when saving a script in SP tought, it is a problem in SP, it seems that it doesn't escape special caracters before saving a script.