Page 1 of 1

Bug with apostrophe in displayed text in pupdialog

Posted: Sat Feb 17, 2024 3:54 pm
by Caramel

(EasyOS 5.7)

There is a problem when the character ' appears in the text displayed by pupdialog.

Line 126 of /usr/bin/pupdialog

Code: Select all

eval "${AVAR}='${AVAL}'" 

AVAR is a variable that contains the name of another variable (AVAR is modified during the script execution, it represents several variables at different times)
AVAL is a variable with text to be displayed.
The line is a assignation of the value of AVAL to the variable $AVAR (not to AVAR but to the variable that is the value of AVAR)

This eval command fails if there is an apostrophe (') in the text contained in AVAL.

This code (inspired by https://www.baeldung.com/linux/bash-safe-use-eval) seems to work

Code: Select all

eval ${AVAR}=\"${AVAL}\"

PS : This problem is encountered in the French text of the ROX-app Trash with "Confirmer l'action"