ajax - jQuery GetJSON Security Issues. Copying URL and pasting in the browser -



ajax - jQuery GetJSON Security Issues. Copying URL and pasting in the browser -

i using jquery getjson phone call in asp page. next code:

$.ajax({ url: myurl/mypage.aspx?callback=bookaroom, datatype: 'json' });

this end in room beingness booked in system, issue if user copies url , pastes in browser, room booked. since has session, can't differentiate in asp pages. how can prevent this?

there 2 problems here.

first problem: get requests supposed safe. there lots of things can trigger get request. if changing state based on get request, code dangerously broken. utilize post.

secondly, other websites can cause user create requests website. known cross-site request forgery. typical solution require nonce each request. because nonce unknown other website, can no longer forge requests. link provided give farther reading on alternative solutions.

jquery ajax json security

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -