Posts

Showing posts with the label Security

JavaScriptStringEncode : Javascript Compitable encoding

Hello, Recently I was facing very interesting issue. and the solution for the issue was introduced in the new updates in asp.net framework 4.0. Generally when we try to render HTML content on page clientside/ by javascript, it gives error of Potential dangerous content error. http://msdn.microsoft.com/en-us/library/ms972967.aspx There are lot's solutions but have to compromise security of page. by setting <%@ Page Language="C#" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="_default" ValidateRequest="false"%>  But now we have perfect solution which is introduced in .net framework 4.0 HttpUtility.JavaScriptStringEncode Method URL encoding makes sure that all browsers correctly encodes text in URL strings. Few Characters such as a question mark (?), ampersand (&), slash (/), and spaces might be truncated or corrupted by some browsers. Therefore, these characters must be encoded in a elem...

Protect image from being copied

Image
Hello Friends, Many times I am asked to protect some copyrighted images over web, so finally I have found a better way to protect from being copied. There are some cases by which we can copy the image Here I have taken care of following cases Right click on image and Save the Image Save the Entire page and all images displayed on page will be downloaded to its Data Folder in mozila Firefox, We can save the media files by following steps Right click on Page, select “View Page Info” It will open a window, Select “Media” tab, here a list of all files will be available select particular file and click on “Save As” button to save the media Now Let’s Start our main topic,that is protect image from being copied There is a concept called Data URI scheme . Generally to display any image on page, we use Relative_URL and if we display image using this, the images can be easily copied. Here we will save image in database and retrieve the same To Create table CR...

Sql Injection

Hello friends, After a long time again now i am going to write something in my blog. Today i am going to write about Sql injection . So i will cover this many steps in my this topic Create fear what is Sql Injection Description about Sql Injection