Solved

Hiding the password from View Source

Posted on 2009-07-08
4
215 Views
Last Modified: 2013-12-24
Experts,

Is it possible to hide the password from the view page source? Please see the code below.
I am using a Javascript function and passing the id,password, but when I view the soruce
I can see the password in my form code where I am calling the javascript function and is a problem to see the password as you know that.

P:S: I am clicking a link to go to a different website sending id,password

This is kind of urgent and solution to this is greatly appreciated
<SCRIPT LANGUAGE="JavaScript">
function gotomySite(Yourid,password){
	document.Login.Yourid.value = Yourid;
	document.Login.password.value = password;
	document.Login.submit();
}
</script>	
<form name="Login" action="https://gotomysite" method="post">		
	<input type="hidden" name="Yourid" value="" />
	<input type="hidden" name="password" value="">
	<tr align="right">
		<td>
			<a href="#"  onClick="javascript:gotomySite(<cfoutput>'#Yourid#','#getCode.password#'</cfoutput>);">Click Here to go to My Site</a> 	
		</td>				
	</tr>
</form>

Open in new window

0
Comment
Question by:Tpaul_10
  • 3
4 Comments
 
LVL 13

Expert Comment

by:srikanthmadishetti
ID: 24811237
i would suggest encrypt the password and put it  while sendin to your function in the argument it self decrypt it

Like this

  <a href="#"  onClick="javascript:gotomySite(<cfoutput>'#Yourid#','#decrypt(getCode.password,key)#'</cfoutput>);">Click Here to go to My Site</a>
0
 
LVL 13

Expert Comment

by:srikanthmadishetti
ID: 24811286
Please have a look at this url  for encryption and decryption in coldfusion

http://www.adobe.com/devnet/server_archive/articles/understanding_encrypt.html
0
 

Author Comment

by:Tpaul_10
ID: 24819238
srikanthmadishetti,

I have tried this, but it still shows the password in the viewsource. Thanks for the information.
I have tried to put the cilck event in a fuseaction and have the code in action file. It stops hiding from the link, but the problem is when I click the link to go to the other website, it asks you are going to redirect to a site which is not secure and "do you want to Contunue"?
If i say NO, then it stays in the action page and if i view the source it still shows the password value.
I am completely out of ideas what to do, really appreciate if there is some thing in CF to do this.

Thanks
0
 
LVL 13

Accepted Solution

by:
srikanthmadishetti earned 500 total points
ID: 24826059
yup actaully i wrote iit wrong .

The only thing i can think of is to send the data in encrypted format only to the other site and decrypt there .

when you are passing sensitive data like passwords it should be encrypted and sent


0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question