Jump to content

Recommended Posts

I started this project about 6 months ago haven't had much time to work on it or complete it but here it is please give me your feedback.

 

Features *

 

Add Contacts (stores in MySQL)

Edit Contacts

Export Contacts to CSV

Email Contacts Via Outlook or Straight from the AddressBook Via Php Mail

-----------------------------------------------------------------------

( please use Firefox Looks Best In Firefox)

 

 

http://nitestryker.com/address/contacts.php

 

please give me your feedback

 

 

Link to comment
https://forums.phpfreaks.com/topic/127337-php-addressbook/
Share on other sites

Cross Site Scripting(XSS):

You can submit ">code when adding a contact and it will execute on the contacts page.

 

Full Path Disclosure:

http://nitestryker.com/address/edit.php

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /nfs/c02/h03/mnt/29237/domains/nitestryker.com/html/address/edit.php on line 16

 

You receive this when adding a contact:

contact added

Warning: Cannot modify header information - headers already sent by (output started at /nfs/c02/h03/mnt/29237/domains/nitestryker.com/html/address/addcontact.php:19) in /nfs/c02/h03/mnt/29237/domains/nitestryker.com/html/address/addcontact.php on line 21

 

Link to comment
https://forums.phpfreaks.com/topic/127337-php-addressbook/#findComment-659258
Share on other sites

  • 5 months later...

Thanks for the feedback, I am already aware of the ability to use XSS when adding contacts I plan to fix that as soon as I have time. what about the overal design I suck at doing the graphics and design part, I would like to hear your feed back on the design.

Link to comment
https://forums.phpfreaks.com/topic/127337-php-addressbook/#findComment-800060
Share on other sites

Warning: Cannot modify header information - headers already sent by (output started at /nfs/c02/h03/mnt/29237/domains/nitestryker.com/html/address/edit.php:15) in /nfs/c02/h03/mnt/29237/domains/nitestryker.com/html/address/edit.php on line 16

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /nfs/c02/h03/mnt/29237/domains/nitestryker.com/html/address/edit.php on line 18

 

 

i just noticed it only occurs in web developer bar not firebug  :P

 

https://addons.mozilla.org/en-US/firefox/addon/60

Link to comment
https://forums.phpfreaks.com/topic/127337-php-addressbook/#findComment-800788
Share on other sites

edit.php:

<?php
$connect= new mysqli('localhost','user','pass','db'); //connecting to MYSQLI
function clean($text){
$text=strip_tags(trim(mysql_real_escape_string($text)));
}
//sanitizing variables for XSS/SQL injection
$Job_Title= clean($_POST['Job_Title']);
$Work_Phone= clean($_POST['Work_Phone']);
$Work_Fax= clean($_POST['Work_Fax']);
$Website= clean($_POST['Website']);
$update= clean($_POST['update']);
$sql= $connect ->prepare("INSERT INTO table VALUES (?,?,?,?,?)"); //preparing MYSQLI statement
$sql ->bind_param
('sssss',$Job_Title,$Work_Phone,$Work_Fax,$Website,$update); //binding MYSQL values to statement
$sql ->execute(); //execute prepared MYSQLI statement
?>

 

doing the following would greatly reduce Injection ;D

Link to comment
https://forums.phpfreaks.com/topic/127337-php-addressbook/#findComment-804738
Share on other sites

The code I used was similar to the one above. hoeever I don't want to post my variables here so i will just give you an example.

 

above I connect to my DB

below that

 


/* clean function */

function make_clean_general($var) {  	       
return mysql_real_escape_string(trim($var)); }

$variable = make_clean_general($_POST['variable']);

[/code]

and then I insert those variables into my database.

 

when I did a test last night I tried to do a meta redirect in one of the form input fields and it didn't allow it.  although some things still worked so I am probably gonna have to write something else. the problem is time, right now I just don't have alot of time to

continue this project. but what I would like to do is re-write the whole thing using this as a base and  make a better more secure one.

Link to comment
https://forums.phpfreaks.com/topic/127337-php-addressbook/#findComment-804988
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.