Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-02-2009, 06:59 PM   PM User | #1
FM4k
New to the CF scene

 
Join Date: Feb 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
FM4k is an unknown quantity at this point
Question "Wildcards" for PHP directory names?

Hey all - silly question: Is it possible to use some sort of "wildcard" character for directory names?

I ask because I've thought about using directories with "blank" names for security purposes, as an a user outside the server is incapable of viewing the folder... as the url would technically be "http://www.website.com/dir//file.ext" (which I think is rather sneaky).

So... yay or nay?
FM4k is offline   Reply With Quote
Old 05-03-2009, 01:43 AM   PM User | #2
hthought
New Coder

 
Join Date: May 2009
Posts: 55
Thanks: 1
Thanked 4 Times in 4 Posts
hthought is an unknown quantity at this point
How exactly are you going to create unamed folders?
hthought is offline   Reply With Quote
Old 05-03-2009, 01:49 AM   PM User | #3
venegal
Gütkodierer


 
Join Date: Apr 2009
Posts: 2,127
Thanks: 1
Thanked 426 Times in 424 Posts
venegal has a spectacular aura aboutvenegal has a spectacular aura about
Concerning programming style, sneakiness is not at all a desired property.

You should use .htaccess to block outside access to folders.
venegal is offline   Reply With Quote
Old 05-03-2009, 07:53 AM   PM User | #4
FM4k
New to the CF scene

 
Join Date: Feb 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
FM4k is an unknown quantity at this point
Re: hthought - WinXP can create blank folders by using copy/paste during a rename using particular unicode characters; Windows won't paste the character.. but instead renames the folder as having no name.

I've done tests, and these folders work fine on all Linux, Mac, and Windows... oddly enough

And.. re: venegal - This is for a homebrew plug-n-play CMS (you just drop it on a PHP5 server and run it... and it works.) - So no htaccess is "allowed" for this one

That being said - Any suggestions?
FM4k is offline   Reply With Quote
Old 05-03-2009, 12:37 PM   PM User | #5
venegal
Gütkodierer


 
Join Date: Apr 2009
Posts: 2,127
Thanks: 1
Thanked 426 Times in 424 Posts
venegal has a spectacular aura aboutvenegal has a spectacular aura about
Why would .htaccess not be allowed? You just drop it on the server and it works too.
venegal is offline   Reply With Quote
Old 05-03-2009, 03:09 PM   PM User | #6
FM4k
New to the CF scene

 
Join Date: Feb 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
FM4k is an unknown quantity at this point
Only because it's possible that someone might also have an .htaccess file on their server already

I'm just trying to make this as idiot-proof as possible :P

So far, though, PHP doesn't seem to be able to decipher any invisible characters :'(
FM4k is offline   Reply With Quote
Old 05-03-2009, 06:55 PM   PM User | #7
venegal
Gütkodierer


 
Join Date: Apr 2009
Posts: 2,127
Thanks: 1
Thanked 426 Times in 424 Posts
venegal has a spectacular aura aboutvenegal has a spectacular aura about
But there already being an .htaccess file somewhere on the server poses no problem -- yours would just be sitting around in your own restricted folder, not caring about what all those other .htaccess files out there are doing. I implore you, forget about your blank directory name security solution.
venegal is offline   Reply With Quote
Reply

Bookmarks

Tags
directory, fm4k, question, wildcard

Jump To Top of Thread


Thread Tools
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

Forum Jump


All times are GMT +1. The time now is 01:34 AM.


Advertisement
Log in to turn off these ads.