Solved

Hiding the password from View Source

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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

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 …
What You Need to Know when Searching for a Webhost Provider
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…

696 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