migol / opencaching-pl

Automatically exported from code.google.com/p/opencaching-pl
0 stars 0 forks source link

QRcode generator bugs #41

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1. path-related problems, QRcodes are working when $dynbasepath points to 
www-root, because image is saved under $dynbasepath + "/tmp/qrcode.jpg", and 
then referenced as img src="/tmp/qrcode.jpg" from html

2. when multiple users generate qr-codes simultaneously, one can get code of 
another user, because all of them are stored in a single location in a 
filesystem

Original issue reported on code.google.com by boguslaw...@gmail.com on 17 Feb 2014 at 12:38

GoogleCodeExporter commented 9 years ago
There are 2 ways of dealing with this: 

1)
- create a subfolder where to store codes temporarily
- each code is generated and saved with unique name indicating it's contents. 
perhaps based on a MD5 of the contents?
- these entries should be cleaned-up periodically, as it is a potential DoS 
source. 
Or the script, on each run, should do the clean-up, by deleting any generated 
files, olders first, so that only a number of $cnt_qr_code files exist at any 
one time.

2) the actual qr code generation be live, and the IMG tag in the page call this 
script, which returns the contents of the QR code image. 
This can increase CPU load on the server and be another type of DoS if not 
implemented properly. Perhaps locking? 

Original comment by andrixnet on 1 Apr 2014 at 2:54

GoogleCodeExporter commented 9 years ago
Issue 66 has been merged into this issue.

Original comment by wloczynutka on 11 Apr 2014 at 9:25

GoogleCodeExporter commented 9 years ago
The QR code page features a possibly hardcoded example URL 
http://opencaching.pl/viewcache.php?wp=OP3C90

The example URL should be generated from $absolute_server_URI.

The image is a sample label with hardcoded opencaching.pl text as pixels. 
The image template used for generating this label should follow a similar 
structure as statpics, that is have several label images available and user 
select which one to use. Among others, I'd like to have a pure QR code image, 
no fancy anything around it. 

Also, a link could be added to cache listing page to generate a qr code with 
one click, rather then copy paste the URL. 

Original comment by wloczynutka on 11 Apr 2014 at 9:25

GoogleCodeExporter commented 9 years ago
Hardcoded links are solved. Every node can make his own link or image via 
settings.inc.php.
Example is in settingsDefault.inc.php.

Original comment by henricus...@gmail.com on 3 Dec 2014 at 6:29