diff --git a/mozilla/webtools/update/core/inc_global.php b/mozilla/webtools/update/core/inc_global.php
index e0676a82a8b..b9831aff274 100644
--- a/mozilla/webtools/update/core/inc_global.php
+++ b/mozilla/webtools/update/core/inc_global.php
@@ -113,4 +113,26 @@ echo"\n";
include"$page_footer";
exit;
}
+
+function writeFormKey()
+{
+ $sql = "SELECT UserPass FROM t_userprofiles WHERE UserID = '".$_SESSION["uid"]."'";
+ $res = mysql_query($sql) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
+ $row = mysql_fetch_array($res);
+ echo "\n";
+}
+
+function checkFormKey()
+{
+ $key = $_POST["formkey"];
+ $sql = "SELECT UserPass FROM t_userprofiles WHERE UserID = '".$_SESSION["uid"]."'";
+ $res = mysql_query($sql) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
+ $row = mysql_fetch_array($res);
+ if ($key != md5($row["UserPass"]))
+ {
+ echo "
WARNING: FORMKEY MISMATCH!
\n";
+ return false;
+ }
+ return true;
+}
?>
\ No newline at end of file
diff --git a/mozilla/webtools/update/developers/itemoverview.php b/mozilla/webtools/update/developers/itemoverview.php
index f098bd115dc..f1f18b34d13 100755
--- a/mozilla/webtools/update/developers/itemoverview.php
+++ b/mozilla/webtools/update/developers/itemoverview.php
@@ -109,11 +109,13 @@ $sql2 = "SELECT TV.Version, AppName, MinAppVer, MaxAppVer FROM `t_version` TV