Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^12: perl dancer route template hashref pass complex json file to server issue (')

by tye (Sage)
on Jul 30, 2016 at 19:19 UTC ( #1168878=note: print w/replies, xml ) Need Help??


in reply to Re^11: perl dancer route template hashref pass complex json file to server issue (the reverse)
in thread perl dancer route template hashref pass complex json file to server issue

I suspect that your working code does not exactly match the code that you posted above. Trying to guess some things, I encourage you to test your code against a JSON value that contains strings containing a single quote / apostrophe character, a literal backslash character, even a newline character.

Update: Oh, much later I realized how the code you posted could actually work. Valid JSON strings are also valid JavaScript source code. This might well open up a vector for doing cross-site JavaScript injection attacks, though that is likely true using your old 'eval' approach as well.

- tye        

  • Comment on Re^12: perl dancer route template hashref pass complex json file to server issue (')

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1168878]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2023-12-08 00:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (33 votes). Check out past polls.

    Notices?