Programming Theory
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesProgramming Theory

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old February 25th, 2004, 07:06 AM
Nicky's Avatar
Nicky Nicky is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Neverland
Posts: 606 Nicky User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 6 m 53 sec
Reputation Power: 3
Question about registration welcome mail

I'm organising my welcome registration mail and have an issue or two.
When the user registers they are sent an email via the send_welcome_email function.

This function opens the welcome page (a .php?user=fred&pass=frank) and reads it's contents. - this is how I get the contents into a variable to send it though the send routine.

My question is this. I want to send the user their login and password. But I use GET to get these variables into the welcome.php file. - That's not really very secure. Is there some other way securing this process?

Reply With Quote
  #2  
Old February 25th, 2004, 07:30 AM
nawlej nawlej is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Dallas, Tx. USA
Posts: 2,008 nawlej User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 7 m 51 sec
Reputation Power: 5
RE: Question about registration welcome mail

are you encrypting the passwords before they go into the database? If you are, then you could query the database using the record id, and the encrypted password string, instead of username and password....no in the clear usernames and passwords.

Reply With Quote
  #3  
Old February 25th, 2004, 07:32 AM
Nicky's Avatar
Nicky Nicky is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Neverland
Posts: 606 Nicky User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 6 m 53 sec
Reputation Power: 3
RE: Question about registration welcome mail

Yes they are encrypted going into the database . So if I retrieve later the user just gets the encrypted data

Reply With Quote
  #4  
Old February 25th, 2004, 07:39 AM
nawlej nawlej is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Dallas, Tx. USA
Posts: 2,008 nawlej User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 7 m 51 sec
Reputation Power: 5
RE: Question about registration welcome mail

yup, shouldnt make a difference if you are just using it for registration purposes though.

Reply With Quote
  #5  
Old February 25th, 2004, 07:42 AM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: Question about registration welcome mail

i don't understand why you are opening that php page trough GET?

Reply With Quote
  #6  
Old February 25th, 2004, 07:45 AM
nawlej nawlej is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Dallas, Tx. USA
Posts: 2,008 nawlej User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 7 m 51 sec
Reputation Power: 5
RE: RE: Question about registration welcome mail


Quote:
i don't understand why you are opening that php page trough GET?


I think its because shes sending the link in an email, or the source.....and thats the only way the variables will be passed.

Reply With Quote
  #7  
Old February 25th, 2004, 07:46 AM
Nicky's Avatar
Nicky Nicky is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Neverland
Posts: 606 Nicky User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 6 m 53 sec
Reputation Power: 3
RE: Question about registration welcome mail

I'm not opening the page through get.

Does this help
php Code:
Original - php Code
  1.  
  2. function send_welcome_email($username, $pass, $email)
  3. {
  4.        
  5.     /**
  6.     * Create the mail object.
  7.     */
  8.         $mail = new htmlMimeMail();
  9.        
  10.     /**
  11.     *  Create HTML
  12.     */
  13.    
  14.         $page = 'http://'.$server.'/'.WELCOME_EMAIL.'?username='.$username.'&pass='.$pass;
  15.         echo "page is :", $page;
  16.         $read = fopen($page, "r");
  17.         $value = "";
  18.         while(!feof($read)){
  19.             $value .= fread($read, 10000); // reduce number to save server load
  20.         }
  21.         fclose($read);
  22.        
  23.         $mail->setHtml($value, $text, '');
  24.        
  25.        
  26.     /**
  27.     *  Setup Mail Members
  28.     */
  29.         $background = $mail->getFile('images/logo.gif');
  30.         $mail->setFrom("US");
  31.         $mail->setReturnPath(REGISTER_ADDR);
  32.         $mail->setBcc(REGISTER_ADDR);
  33.         $mail->setSubject("Account Registration ");
  34.            
  35.     /**
  36.     *  Send Mail
  37.     */
  38.         $result = $mail->send(array($email));
  39.            
  40.  

Reply With Quote
  #8  
Old February 25th, 2004, 08:28 AM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: Question about registration welcome mail

yes you are. this line is just like opeining the page trough GET method.

fopen($page, "r");

but i still don't get it why you do it? is that your server where the WELCOME_EMAIL script is?

if yes, why don't you just include that script?

Reply With Quote
  #9  
Old February 25th, 2004, 09:08 AM
Nicky's Avatar
Nicky Nicky is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Neverland
Posts: 606 Nicky User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 6 m 53 sec
Reputation Power: 3
RE: Question about registration welcome mail

I share the server.

I'm just trying to get the html into a variable.
I don't know how else to approach it.

Reply With Quote
  #10  
Old February 25th, 2004, 09:03 PM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: Question about registration welcome mail

i ment is that welcome_email script yours?

if yes, then how about smth like:

php Code:
Original - php Code
  1.  
  2. // other code here..
  3. $backup=$_GET;
  4. $_GET=array('username'=>$username, 'pass'=>$pass);
  5. include('some_path_if_needed/'.WELCOME_EMAIL);
  6. $value=ob_get_contents();
  7. $_GET=$backup;
  8. // continue other code..
  9.  


after that, html result of that script will be in $value, and everything else will be just as it was.. (probably ;))

Reply With Quote
  #11  
Old February 25th, 2004, 11:02 PM
Nicky's Avatar
Nicky Nicky is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Neverland
Posts: 606 Nicky User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 6 m 53 sec
Reputation Power: 3
RE: Question about registration welcome mail

Oh - this was exactly how I had it before - I just thought it would be a better way to do it the other way

Thanks - I'll change everything back

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesProgramming Theory > Question about registration welcome mail


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek