Skip to:
Content

bbPress.org

Ticket #1194: 1194.diff

File 1194.diff, 935 bytes (added by GautamGupta, 11 years ago)

Untested but should work

  • bb-settings.php

     
    479479// Load default scripts
    480480require_once( BB_PATH . BB_INC . 'functions.bb-script-loader.php' );
    481481
    482 // Sanitise external input
    483 $_GET    = bb_global_sanitize( $_GET );
    484 $_POST   = bb_global_sanitize( $_POST );
    485 $_COOKIE = bb_global_sanitize( $_COOKIE, false );
    486 $_SERVER = bb_global_sanitize( $_SERVER );
     482/* Check if the globals have been sanitized by WordPress or not (else there would be extra slashes while deep integration) */
     483if ( !function_exists( 'wp_magic_quotes' ) ) {
     484        // Sanitise external input
     485        $_GET    = bb_global_sanitize( $_GET );
     486        $_POST   = bb_global_sanitize( $_POST );
     487        $_COOKIE = bb_global_sanitize( $_COOKIE, false );
     488        $_SERVER = bb_global_sanitize( $_SERVER );
     489}
    487490
    488491
    489 
    490492/**
    491493 * Define theme and plugin constants
    492494 */