Closed QianSong1 closed 6 months ago
Unfortunately, I can't test to reproduce your issue right now, but you could try adding a line at line 318 with unset lines_to_delete_argument
:
if [[ "${custom_portals_full_password}" = "true" ]]; then
echo
language_strings "${language}" "custom_portals_text_11" "red"
if grep -Fq 'password=${password//[*&\/?<>]}' "${tmpdir}${webdir}${checkfile}"; then
-----------------> unset lines_to_delete_argument
lines_to_delete="$(grep -Fn 'password=${password//[*&\/?<>]}' "${tmpdir}${webdir}${checkfile}" | awk -F':' '{print $1}')"
for line_to_delete in ${lines_to_delete}; do
lines_to_delete_argument="${lines_to_delete_argument}${line_to_delete}d;"
done
sed -i "${lines_to_delete_argument}" "${tmpdir}${webdir}${checkfile}"
fi
unset custom_portals_full_password
fi
Let me know if it works please. Thanks.
Added her at line 318. unset lines_to_delete_argument
Now, it's working normally,
Thanks :ok_hand:
What is your plugin?
custom_portals.sh
What is your plugin version?
Latest version
What is your airgeddon version?
11.21
What is the expected behavior?
won't accidentally delete anything extra,
check.htm
Describe the issue and the steps to reproduce it
Add
18d;20d;
to this variable in a loop; Such a string. But every time it is executed, it will be added, and when I operate it every time, it will become18d; 20d; 18d; 20d;
and so on.There isn't much bug with this, but when I choose different
custom_portals
, this commandSo the value of
${line_to delete_argument}
becomes18d; 20d; 18d; 20d; 18d; 20d; 17d; 19d
Haha, this will delete too many things, makingcheck.htm
invalid