Skip to content

Commit 1c6936f

Browse files
author
Fulvio N.
committed
Merge pull request #6 from Polfo/Polfo-$_POST-2
Update class-wp-php-console.php
2 parents 6bb9fff + 2d4b50e commit 1c6936f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/class-wp-php-console.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,11 @@ public function init() {
274274
if ( ! $password )
275275
return;
276276

277+
// Selectively remove slashes added by WordPress as expected by PhpConsole
278+
if(isset($_POST[PhpConsole\Connector::POST_VAR_NAME])) {
279+
$_POST[PhpConsole\Connector::POST_VAR_NAME] = stripslashes_deep($_POST[PhpConsole\Connector::POST_VAR_NAME]);
280+
}
281+
277282
$connector = PhpConsole\Connector::getInstance();
278283
$connector->setPassword( $password );
279284

@@ -303,4 +308,4 @@ public function init() {
303308

304309
}
305310

306-
}
311+
}

0 commit comments

Comments
 (0)