Solved

Hiding the password from View Source

Posted on 2009-07-08
4
211 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

Save on storage to protect fatherhood memories

You're the dad who has everything. This Father's Day, make sure your family memories are protected. My Passport Ultra has automatic backup and password protection to keep your cherished photos and videos safe. With up to 3TB, you have plenty of room to hold the adventures ahead.

Question has a verified solution.

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

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This article discusses how to create an extensible mechanism for linked drop downs.
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…

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now