Reviewed:  https://reviews.mahara.org/2911
Committed: 
http://gitorious.org/mahara/mahara/commit/4eb4e184586422a7567f5f5693bdef0d4ab790bf
Submitter: Aaron Wells (aar...@catalyst.net.nz)
Branch:    master

commit 4eb4e184586422a7567f5f5693bdef0d4ab790bf
Author: Leo Xiong <leoxi...@txttext.com>
Date:   Tue Jan 14 16:34:01 2014 +1300

Added define('JSON', 1) and define('NOSESSKEY') to remove jsdetector and
the requirement of a session key from api/mobile/sync.php and also
upload.php. bug #1268788

Change-Id: I87d304e7ed80ad62c697b7578f84e3a7155a440b
Signed-off-by: Leo Xiong <leoxi...@txttext.com>

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask 
on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1268788

Title:
  mobile_api_json_reply sends extra stuff at the top, making it invalid
  json

Status in Mahara ePortfolio:
  Fix Committed

Bug description:
  An example is this, using the wrong api token

  D/RestClient( 2917): Response =     <form name="jsdetector_form" 
id="jsdetector_form" method="post">
  D/RestClient( 2917):         <input name="javascriptenabled" type="hidden" 
value="true" />
  D/RestClient( 2917):         <script type="text/javascript">
  D/RestClient( 2917):             document.jsdetector_form.submit();
  D/RestClient( 2917):         </script>
  D/RestClient( 2917):     </form>{"fail":"Sorry that mobile upload token was 
not found. Please check your site and mobile application settings."}

  Stolen from a maharadroid with a patch to log the responses, but that
  can be obtained with easier ways.

  Just need to find the jsdectector stuff and make sure it isn't done in
  a part of mahara that has json reply in it. This may actually break
  some of the json stuff as well? or the /api/mobile/sync.php needs a
  define of JSON at the top.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1268788/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to     : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp

Reply via email to