?
Solved

Hiding the password from View Source

Posted on 2009-07-08
4
Medium Priority
?
227 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 2000 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

Plug and play, no additional software required!

The ATEN UE3310 USB3.1 Gen1 Extender Cable allows users to extend the distance between the computer and USB devices up to 10 m (33 ft). The UE3310 is a high-quality, cost-effective solution for professional environments such as hospitals, factories and business facilities.

Question has a verified solution.

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

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…
Suggested Courses

777 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