[wix-devs] Custom action data parsing with equals sign as first char

Christopher Painter chrpai at iswix.com
Tue Apr 30 04:22:32 PDT 2019


I would suggest a new JsonCustomActionData class / session property that people could use instead.   Leave the old one behind for backwards compatibility.



________________________________
From: wix-devs <wix-devs-bounces at lists.wixtoolset.org> on behalf of Vanni Giachin via wix-devs <wix-devs at lists.wixtoolset.org>
Sent: Tuesday, April 30, 2019 3:10 AM
To: wix-devs at lists.wixtoolset.org
Cc: Vanni Giachin
Subject: [wix-devs] Custom action data parsing with equals sign as first char

Hi,

The custom action data string parsing done on Microsoft.Deployment.WindowsInstaller.CustomActionData should in my opinion be adjusted in order to work better in case of values starting with the equals sign.

As example now the Parse method converts: username=domain\user;password==test123! to: {"username": "domain\user", "password==test123!": ""}.

In my opinion after the split by the data separator ( ; ), the first key value separator occurrence ( = ) should be used to detect the key, so: {"username": "domain\user", "password": "=test123!"}.

This because the probability to have special characters (like = ) on the variable key, is lower than have them on the variable value, like in the domain credentials password example above.

Currently the double value ( ;; or == ) is used as escape strategy, however, since the first equals sign not followed by another equals is selected as separator, the current strategy does not work for values starting with equals.

Thank you in advance
____________________________________________________________________
WiX Toolset Developer Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-devs mailing list