sharma-pankaj-tech / phurl

Automatically exported from code.google.com/p/phurl
0 stars 0 forks source link

Restrict Short URL creation but allow redirection. #54

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is a suggestion for additional feature. 

Situation:
---------
I installed PHURL on gwy.in. Spammers used my domain to create short URLs
to sites that were infected with malware and I got notice from "Indian
Computer Emergency Response Team" (a Government department) that my site
"causes visitors of your websites unknowingly redirected to malicious
websites which downloads malicious Trojan into their computers". I
subsequently cleaned all 3rd person created URLs and locked my site with
password for the time being to avoid getting the domain suspended. 

Problem:
-------
Now, my problem is, I have sent out several short links of my own long URLs
to numerous sites, many of which are indexed and would be quite difficult
to recall/revoke. And, because the site is password protected the
redirection won't work. 

Solution Request:
----------------
Restrict URL shortening but allow open access to redirection. The
restriction could be based on admin being logged in. I believe the solution
could be very simple - just checking the session. I could try modifying the
code for my domain, but am suggesting here, because you could update this
very quickly and also because it could be useful to people who need this
script for own use.

Thank you.

Original issue reported on code.google.com by itssri.i...@gmail.com on 23 Mar 2010 at 6:26

GoogleCodeExporter commented 9 years ago
This is not a defect but a feature request. 

Original comment by itssri.i...@gmail.com on 23 Mar 2010 at 6:28

GoogleCodeExporter commented 9 years ago
Here's a patched version you can use for now: 
http://code.cedricd.org/phurl/phurl-1269164814.zip

Things changed:

* Moved isadminlogin() to root functions.php since the admin file includes it 
anyways
* Fixed headers issue
* Made it so only the admin user can see the front page (make urls)

Original comment by dcedr...@gmail.com on 27 Mar 2010 at 10:44

GoogleCodeExporter commented 9 years ago

Original comment by hcblahb...@gmail.com on 3 Jul 2010 at 8:47