Page MenuHomePhabricator

Ex:WikibaseQualityExternalValidation - DumpMetaInformationRepo needs to strictly validate table names
Closed, ResolvedPublic

Description

Since $dumpMetaTableName and $identifierPropertiesTableName are used in raw queries, with on $db->tableName() called on them, they need to strictly validate that the name is a simple string and does not contain sql. Database::tableName() is not safe for preventing sql injection.

It looks like you can validate that they match /[a-z_]+/.

Event Timeline

ExternalDataRepo should also validate its $tableName

Tables names are no longer injected into the database services, but stored as constants. Is this still necessary?

Please note, that the repository has changed.

csteipp claimed this task.

Constants are ok