开发者

How safe is JSONP implementation for login functionality

I am using JSONP for login authentication, below is sample JQuery Code:

$.ajax({  
        type:"GET",        
        url: "https://staging/login/Login.aspx",  // Send the login info to this page
     开发者_运维知识库   data: str, 
        dataType: "jsonp", 
        timeout: 200000,
        jsonp:"skywardDetails",
        success: function(result)
        { 
              //Do something after the success
        } 

    }); 

In above code, I am having HTTPS page for authentication, from my login dailog box, I am sending username and password to my login.aspx page, which calls "WEB SERVICE" taking input send by the login dialog page and return the users details as JSONP object.

My question is that, how safe is above implementation and do also suggest how can I improve my security implementation.

Thanks!


Strictly to authenticate a username/password, that is just as safe as submitting a login form to the same location. The security problem would come from what you're doing (or not doing) in the success function and future ajax requests as javascript can be forged/changed on the fly to tamper with variables (userid notably) you have set.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜