Quotes in commit messages causes failed sync

Issue #3 resolved
Luke Spragg created an issue

No description provided.

Comments (5)

  1. Boris Diadus

    Problem appears because of using stripslashes() filtering of incoming JSON data. gateway.php:62

    file_put_contents( $location . $file, stripslashes(urldecode($_POST['payload'])));
    

    BitBucket gives already valid JSON without redundant escaping. I see no reason of using stripslashes()

  2. Alexandru Lixandru repo owner

    Thanks for the valuable input. I haven't had much free time lately, so I didn't get the chance to look into this. I will hopefully be able to do it sometimes next week.

  3. Alexandru Lixandru repo owner

    Actually I realized why I put the stripslashes there: my server has magic quotes enabled, so all POST data has to be cleared before using it. I put a verification in the code to do quote stripping only when magic quotes are on. This should solve the issue for all setups.

  4. Log in to comment