PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Authentication » LiveUser » Bug #478

LiveUser_Admin_Auth_Container_DB::getUsers, column name restrictions

Details

Submitted2003-12-22 15:03 UTC
Fromjmikola at burgiss dot com
StatusBogus
PackageLiveUser
PHP VersionIrrelevant
OSANY
Roadmaps(Not assigned)

Comments

[2003-12-22 15:03 UTC] jmikola at burgiss dot com

Description:
------------
The following suggestion was made by Laran Coates (LiveUser mailing list) regarding the security concern in the getUsers method where arbitrary data could be injected into the sql query, which expects field names for its select statement:

Couldn't we just put a note in the documentation with a guideline stating:

"Names of additional fields must begin with a character [A-Za-z] or an underscore [_] and may not contain any spaces."

From there it's just a matter of doing:

foreach($_fieldName as $_field) {
if (!preg_match("/^(\w+)/",$_field)) {
trigger_error("invalid field name \"$_field\"");
}
}