security - Securing Ajax Requests in ASP.net via Autenticated Webforms -


I have already read and Now let me explain my scenario, below will be the code snippet that can help in explaining the subject. [WebMethod [EnableSession = True] [ScriptMethod] Public Static String CreateTitle (string strTitleName) {String strResult = "custom json string"; If (session ["Authorized"] == "Truth" & amp; amp; String.INNLLI below (strTitleName) {string strTitle = Server.HtmlEncode (strTitleName); InsertRecordInDB (strTitle); StrResult = "custom jSOn string" + Encrypt MD5 ("Record ID"); Return return}

and the Javascript call to send the parameters below is the BtnCreateTitle_click button. The client side's click event is the TxtTitle title name accepting the textbox. Validated pages have also been made to validate the textbox. CreateTitle is a page method that I call using ScriptManager

  function BTN Cretalitlical (avent) {if (Page.ClientValidate ()) {if ($ get ("getTxtTitle")) {PageMethods.CreateTitle ($ ("txtTitle" value, success, failure, references); The success of the function shows a deep message that the title was created and shows a link with the encrypted records id as the query string to the URL, whose creation is to see the title details. Is for.  

Now the burning question,

  1. Is it safe enough? What am i missing
  2. How can I make this process more secure and fast?

    Unscrupited to restrict any method for authenticated and authorized users When you show the dub id in the query string, then you open the possibility that a certified and authorized user can try to use records that are not of them. This occurs especially when the DB ID integer or some others easily recognize the identifier. Using guides as DB ID can reduce its risk, though not at all.

    You should always remember that there is no trust input. Security (ie encryption, etc.) is not a reliable technique through ambiguity. Your service should always verify that the records requested by the current user Permission has been granted to recover. Sometimes this is known as the level of level security, it can only be done programmatically.

    Instead of being able to see the records, instead of being able to see the record, It is essential that they actually have the right to use the record.

    This means that you

    BTW: Any HTTP request is probably valid for the hazardous input.

    Hope this helps,

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -