Ahh, yes, right. The root issue is that the Source encryption state is rarely 
set “correctly”.   I 100% agree that using the target’s encryption state is 
weird. I guess what is needed is a “BVariantCopyEx()” (better name’s welcome) 
that is what you had originally to specify the final desired encryption state 
(i.e. you were right).

I still stand by my comment though that the variables parsing from XML using 
variant as it does is pretty inefficient. <wink/>


Note: the FireGiant change was the direct fix that was tested to unblock other 
processes happening here.


Note2: The comment “// Encryption here (and decryption later inside 
BVariantCopy) could have been optimized away with breaking change.” is going 
look very strange over time. It’s much better for comments to explain why 
something was done vs. explaining that something that was not done could have 
been done. The latter will be very confusing (or frustrating) trying to figure 
out what the actual issue is. <smile/>


_______________________________________________________________
FireGiant  |  Dedicated support for the WiX toolset  |  
http://www.firegiant.com/

From: Sean Hall [mailto:r.sean.h...@gmail.com]
Sent: Tuesday, November 25, 2014 1:19 PM
To: WiX toolset developer mailing list
Subject: Re: [WiX-devs] Just opened bug 4609 against v3.9

No, to make encryption work properly while still calling BVariantCopy without 
changing its signature, the caller has to call BVariantSetEncryption on the 
source first (this is the avoidable encryption/decryption cycle).  Which I did 
in this commit, all non-breaking changes that fixes all of the bug: 
https://github.com/rseanhall/wix3/commit/4fddecd41bbd33036d773c8190e19919665fa2b5.

FireGiant's pull request fixes the Hidden variable bug, and could fix the whole 
bug if all callers of BVariantCopy properly set the target's encryption state 
before calling.  Using the target's encryption seems counter intuitive to me 
though, especially since it's an out parameter.

On Tue, Nov 25, 2014 at 2:36 PM, Rob Mensching 
<r...@firegiant.com<mailto:r...@firegiant.com>> wrote:
Seems like the only avoidable encrypt/decrypt cycle is when variables are 
parsed from XML, right? If so, the current code isn’t terribly efficient as it 
is. Creating an “BVariantSetEveryting()” (better name needed) that provided a 
value (coerced string?), type and encryption state would be a better way to 
address that code.

Right now, we (FireGiant) are doing the smallest fix possible so hidden 
variables can be set. We are not doing the bigger better fix to actually 
implement the encryption for uninitialized hidden variables (without breaking 
API changes).

_______________________________________________________________
FireGiant  |  Dedicated support for the WiX toolset  |  
http://www.firegiant.com/

From: Sean Hall [mailto:r.sean.h...@gmail.com<mailto:r.sean.h...@gmail.com>]
Sent: Tuesday, November 25, 2014 12:02 PM
To: WiX toolset developer mailing list
Subject: Re: [WiX-devs] Just opened bug 4609 against v3.9

That works, too.  That just means at least one additional encryption/decryption 
cycle, which I was trying to avoid.

On Tue, Nov 25, 2014 at 1:55 PM, Rob Mensching 
<r...@firegiant.com<mailto:r...@firegiant.com>> wrote:
Breaking change to BVariantCopy(). What if we always use the encryption state 
of Source and always nuke Target’s encryption state (like you are on 
variant.cpp:271)? Then we just need to get the Source state set correctly 
before copying.

I think that makes a lot of sense anyway, right?  Target encryption state 
matches Source encryption state on success.

_______________________________________________________________
FireGiant  |  Dedicated support for the WiX toolset  |  
http://www.firegiant.com/

From: Sean Hall [mailto:r.sean.h...@gmail.com<mailto:r.sean.h...@gmail.com>]
Sent: Tuesday, November 25, 2014 11:47 AM
To: WiX toolset developer mailing list
Subject: Re: [WiX-devs] Just opened bug 4609 against v3.9

Here's how I would fix it: 
https://github.com/rseanhall/wix3/commit/e14695eeac02b82f7d2ed392606cd1c8a670a7ab

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
WiX-devs mailing list
WiX-devs@lists.sourceforge.net<mailto:WiX-devs@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/wix-devs

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
WiX-devs mailing list
WiX-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-devs

Reply via email to