View Issue Details

IDProjectCategoryView StatusLast Update
0004867OXID eShop (all versions)4.07. Source code, Testpublic2015-12-01 10:45
Reporterunited20 
PrioritynormalSeveritytweakReproducibilityalways
Status acknowledgedResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0004867: Trim whitespaces in oxConfig::checkParamSpecialChars()
DescriptionIn some cases it is usefull to trim all whitespaces in oxConfig::checkParamSpecialChars()
Additional InformationModified code:

public function checkParamSpecialChars( & $sValue, $aRaw = null )
{
    if ( is_object( $sValue ) ) {
        return $sValue;
    }

    if ( is_array( $sValue ) ) {
        $newValue = array();
        foreach ( $sValue as $sKey => $sVal ) {
            $sValidKey = $sKey;
            if ( !$aRaw || !in_array($sKey, $aRaw) ) {
                $this->checkParamSpecialChars( $sValidKey );
                $this->checkParamSpecialChars( $sVal );
                if ($sValidKey != $sKey) {
                    unset ($sValue[$sKey]);
                }
            }
            $newValue[$sValidKey] = trim( $sVal );
        }
        $sValue = $newValue;
    } elseif ( is_string( $sValue ) ) {
        $sValue = str_replace( array( '&', '<', '>', '"', "'", chr(0), '\\' ),
                               array( '&', '<', '>', '"', ''', '', '\' ),
                               trim( $sValue ) );
    }
    return $sValue;
}
TagsNo tags attached.
ThemeNot defined
BrowserAll
PHP VersionNot defined
MySQL VersionNot defined

Activities

There are no notes attached to this issue.