cvs: pearweb /public_html package-new.php
| From: | Martin Jansen | Date: | Sat, 14 Dec 2002 17:29:37 +0000 |
| Subject: | cvs: pearweb /public_html package-new.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-7886@lists.php.net to get a copy of this message | ||
mj Sat Dec 14 12:29:37 2002 EDT
Modified files:
/pearweb/public_html package-new.php
Log:
* Make package-new.php register_globals=off safe.
Index: pearweb/public_html/package-new.php
diff -u pearweb/public_html/package-new.php:1.15 pearweb/public_html/package-new.php:1.16
--- pearweb/public_html/package-new.php:1.15 Tue Oct 8 13:53:25 2002
+++ pearweb/public_html/package-new.php Sat Dec 14 12:29:37 2002
@@ -15,7 +15,7 @@
+----------------------------------------------------------------------+
| Authors: |
+----------------------------------------------------------------------+
- $Id: package-new.php,v 1.15 2002/10/08 17:53:25 mj Exp $
+ $Id: package-new.php,v 1.16 2002/12/14 17:29:37 mj Exp $
*/
require_once "HTML/Form.php";
@@ -46,7 +46,7 @@
}
}
- if (!preg_match(PEAR_COMMON_PACKAGE_NAME_PREG, $name)) {
+ if (!preg_match(PEAR_COMMON_PACKAGE_NAME_PREG, $_POST['name'])) {
display_error("Invalid package name. PEAR package names must start ".
"with a capital letter and contain only letters, ".
"digits and underscores. PECL package names must be ".
@@ -56,23 +56,23 @@
$dbh->expectError(DB_ERROR_ALREADY_EXISTS);
$pkg = package::add(array(
- 'name' => $name,
- 'category' => $category,
- 'license' => $license,
- 'summary' => $summary,
- 'description' => $desc,
- 'homepage' => $homepage,
+ 'name' => $_POST['name'],
+ 'category' => $_POST['category'],
+ 'license' => $_POST['license'],
+ 'summary' => $_POST['summary'],
+ 'description' => $_POST['desc'],
+ 'homepage' => $_POST['homepage'],
'lead' => $auth_user->handle
));
$dbh->popExpect();
if (DB::isError($pkg) && $pkg->getCode() == DB_ERROR_ALREADY_EXISTS) {
- error_handler("The `$name' package already exists!",
+ error_handler("The `" . $_POST['name'] . "' package
already exists!",
"Package already exists");
exit;
}
$display_form = false;
response_header("Package Registered");
- print "The package `$name' has been registered in PEAR.<br />\n";
+ print "The package `" . $_POST['name'] . "' has been
registered in PEAR.<br />\n";
print "You have been assigned as lead developer.<br />\n";
}
} while (false);