PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |

Go Back   PhotoPost Community > PhotoPost Support > PhotoPost Classifieds Support > Classifieds Bug Reports

Classifieds Bug Reports Post any problems you may be having with Classifieds here.

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old March 30th, 2005, 07:24 PM   #1 (permalink)
Member
Verified Customer
 
Join Date: Dec 2004
Location: Osaka
Posts: 158
Talking Zip Code Integration Bugs (and fix!)

Found a few, some relate to everyone, some just for people with letters in their zipcodes.

Firstly, the datatype for "zipcode" in the product table is int, this should be varchar

Secondly code changes required as if you had a Lat or Long < 0 (where I am is -0.XXX), the current code would assume an error! so we change it so only EQUAL to 0 will throw a problem)

REMOVED TO NOT CONFUSE PEOPLE--OMEGATRON

Thats it! I've now got classifieds running using the UK postcode system, and works great!

Last edited by Chuck S; March 31st, 2005 at 08:33 AM.
benFF is offline   Reply With Quote
Old March 31st, 2005, 08:35 AM   #2 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,698
Our zipcode integration is coded and works fine. You may post code hacking instructions on photopostdev.com

I have removed your examples of how to hack the files to UK so as not to confuse people and thing there is bugs when there are not.

In fact in the code you posted you removed a security thing in the query which in your installation would allow a user to inject malicious url into your site

".intval($prodzipcode)." THAT IS A SANITISER you do not remove that
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old March 31st, 2005, 09:58 AM   #3 (permalink)
Member
Verified Customer
 
Join Date: Dec 2004
Location: Osaka
Posts: 158
I'm sorry, but that security comment is just not correct. If you browse the source for both showcat and showproduct, you will see intval is only used the once, it is NOT used on the users zip they input in the forum:

$query = "SELECT lon,lat FROM zipData WHERE zipcode = '$zipcode'"; (showproduct, line 505)

The datatypes also do not match up, in the zipcodes table it uses varchar, products int.

And the error on line 510 of showproduct IS an error:

Code:
Content visible to verified customers only.
So only if both values are above 0 will it be ok, well, here in the UK, my long lat position is 51.453 / -0.16 ... which automatically fails that logic (obviously -0.16 is not higher than 0 ).

The correct coding is used when doing long2 and lat2 (line 526) which makes sure they dont equal 0...

Code:
Content visible to verified customers only.
benFF is offline   Reply With Quote
Old April 1st, 2005, 09:18 AM   #4 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,698
Our zipcode integration is only US supported and what is packaged with the product.

You may post all the file modifications at the hack site meantioned above

You are the one wrong about the intval thing.

".intval($prodzipcode)." THAT IS A SANITISER you do not remove that

You dont need to sanatize a SELECT statement (thats pulling info from the database) however you do need to sanatize or check that the INPUTED DATA into an INSERT is sanatized to prevent malicious html etc from being entered.

We do not allow users to post potential bugs on our support forum hense is why I removed your code and asked you to post this elsewhere. Please refrain from posting any more code blocks that could confuse our customers and have them alter there code unsecurely.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old April 1st, 2005, 10:34 AM   #5 (permalink)
Member
Verified Customer
 
Join Date: Dec 2004
Location: Osaka
Posts: 158
I dont want to get in a fight with you and i am sorry if i am coming across as such, however the .intval(etc) IS a select statement.. (showproduct line 521), i have not modified any insert statements.

What is the point of a bug forum though, if you don't allow users to post bugs?

The >0 problem is also addressed in all the other coding parts by Michael himself (he users != 0 later on) - so it would seem that is a bug. Likewise with the datatype mismatch (why have one as varchar and one as int.....)
benFF is offline   Reply With Quote
Old April 18th, 2006, 06:42 PM   #6 (permalink)
Member
Verified Customer
 
Join Date: Feb 2006
Posts: 87
photophostdev is just some dudes site> there is nothing there??? confused!
alfaowner is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Version 3 Bugs or how do you fix them?(NOT A BUG) nf71 ReviewPost Bug Reports 6 September 2nd, 2005 12:31 PM
Zip Code integration, for Canada too... nexia General Discussion 3 February 7th, 2005 09:11 AM
Zip Code Does Not Work joe4 Before You Buy 2 December 22nd, 2004 03:23 PM
Zip Code Error HobbyTalk Classifieds Bug Reports 0 December 3rd, 2004 01:27 PM


All times are GMT -5. The time now is 08:37 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0