Bug Tracker

Modify

Ticket #3565 (closed bug: invalid)

Opened 5 years ago

Last modified 3 years ago

ajax.js:httpData patch for failing JSON eval()

Reported by: robman Owned by:
Priority: low Milestone: 1.3
Component: ajax Version: 1.2.6
Keywords: httpData JSON Cc:
Blocking: Blocked by:

Description

BUG: httpData: function in ajax.js (used by getJSON() calls or get() calls where type == "json") doesn't currently test the eval is successful.

e.g. it just assumes that valid JSON was returned and eval will succeed, silently failing if this is the case.

FIX: Here's a patch to bring it in line with the other functions above.

e.g. httpSuccess and httpNotModified

NOTE: Let me know if there's a more "preferred" way to handle this error

DIFF against 1.2.6 from svn: see attached patch file

Attachments

httpData.patch Download (759 bytes) - added by robman 5 years ago.
DIFF against 1.2.6 from svn

Change History

Changed 5 years ago by robman

DIFF against 1.2.6 from svn

comment:1 Changed 3 years ago by rwaldron

  • Priority changed from major to low
  • Status changed from new to closed
  • Resolution set to invalid

This issue is not valid as jQuery no longer uses eval for JSON parsing.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.