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, 06: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, 06: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 8 m 12 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, 06: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, 06: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 8 m 12 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, 06: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, 06: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 8 m 12 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, 06: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, 07: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, 08: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, 08: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, 10: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!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

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




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