From a94078632b0ef6409e7210a0e646e223b23997e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xe=CC=81fir=20Destiny?= Date: Tue, 22 Oct 2013 09:53:41 +0200 Subject: [PATCH] mieux --- ajax.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ajax.php b/ajax.php index fee7fb9..0c4b517 100644 --- a/ajax.php +++ b/ajax.php @@ -22,8 +22,8 @@ if (!empty($_POST['action'])) { if ($_POST['action'] == 'status') { echo ansi2html($session->exec('bash -c \'cd ' . $config['path'] . ' && ' . $gitstatus . "'")); } else if ($_POST['action'] == 'push') { - $message = empty($_POST['message']) ? 'FTP' : $_POST['message']; - echo ansi2html($session->exec('bash -c \'cd ' . $config['path'] . ' && git add -A && git commit -m "' . str_replace(array('"', "'"), ' ', $message) . '" && git push && ' . $gitstatus . "'")); + $message = empty($_POST['message']) ? 'FTP' : str_replace(array('"', "'"), ' ', stripslashes($_POST['message'])); + echo ansi2html($session->exec('bash -c \'cd ' . $config['path'] . ' && git add -A && git commit -m "' . $message . '" && git push && ' . $gitstatus . "'")); } else if ($_POST['action'] == 'pull') { echo ansi2html($session->exec('bash -c \'cd ' . $config['path'] . ' && git pull && ' . $gitstatus . "'")); }