Solved

Hiding the password from View Source

Posted on 2009-07-08
4
223 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
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…

691 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