Misuse of $TmpVal in installer

NEW
Unassigned

Status

()

P5
normal
2 years ago
a year ago

People

(Reporter: agashlin, Unassigned)

Tracking

54 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
This use of $TmpVal in Function preSummary seems to be assuming it is either HKLM or HKCU, as it is in Section "-Application":

>    ${If} $TmpVal == "HKLM"
>      SetShellVarContext all ; Set SHCTX to all users
>    ${EndIf}

http://searchfox.org/mozilla-central/rev/2fc8c8d483d9ec9fd0ec319c6c53807f7fa8e8a2/browser/installer/windows/nsis/installer.nsi#1013

But when preSummary runs, $TmpVal is not yet set this way, as the install hasn't started yet, so the test will always fail. A few lines down there's a check of $TmpVal against values set in CheckExistingInstall, called from leaveOptions, leaveDirectory, leaveShortcuts, so even if $TmpVal had been set to "HKLM" it wouldn't have survived if there was a preexisting Firefox install.

It's not clear whether this matters, likely not as it seems this had never worked as intended.
Priority: -- → P4
Priority: P4 → P5
You need to log in before you can comment on or make changes to this bug.