[wpkg-users] [Bug 96] New: Crash/ exception when checking the value of a non-existent registry entry
bugzilla-daemon at bugzilla.wpkg.org
bugzilla-daemon at bugzilla.wpkg.org
Sat Jan 12 03:20:05 CET 2008
http://bugzilla.wpkg.org/show_bug.cgi?id=96
Summary: Crash/exception when checking the value of a non-
existent registry entry
Product: WPKG
Version: 1.0-rc2
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: wpkg.js
AssignedTo: mangoo at wpkg.org
ReportedBy: nlopez at espri.arizona.edu
QAContact: wpkg-users at lists.wpkg.org
wpkg.js 1.0-RC5 doesn't check if it actually loaded a registry value before
trying to "toLowerCase()" it, in the condition="equals" case.
case "equals":
var val = getRegistryValue(checkPath);
===========ADDED===========
if (val == null) {
return false;
}
===========ADDED===========
if (val == checkValue) {
// Some debugging information.
dinfo("The registry path '" + checkPath + "'
contained the correct value: '" +
checkValue + "'. The check was
successful");
return true;
} else {
// try if expanded value matches
(case-insensitive)
var shell = new ActiveXObject("WScript.Shell");
expandedCheckValue =
shell.ExpandEnvironmentStrings(checkValue);
if (val.toLowerCase() ==
expandedCheckValue.toLowerCase()) {
dinfo("The registry path '" + checkPath
+ "' contained the expanded value: '" +
expandedCheckValue + "'. The
check was successful");
return true;
} else {
info("The registry path '" + checkPath
+ "' did not contain the value: '" +
checkValue + "'.
Instead it contained '" + val + "'. the check failed");
return false;
}
}
--
Configure bugmail: http://bugzilla.wpkg.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the wpkg-users
mailing list