News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Illegal Characters

Started by 127.0.0.1, October 16, 2004, 02:10:45 PM

Previous topic - Next topic

127.0.0.1

Why are there such a thing as illegal characters in filenames, etc.?

Metho

Because without those checks a hacker could possibly cause the way the system processes code to break, and then there's the possibility to inject malicious code into the system.

- Methonis
Joshua "Methonis" Frazer
Support Specialist
The Simple Machines Team

[Unknown]

If you upgrade to RC2, and turn on encrypted filenames, you should be able to post attachments with a much broader range of characters.

-[Unknown]

127.0.0.1

No no. This question has nothing to do with SMF. I mean in general with computers. There's illegal characters in Windows, illegal characters when you sign up for Yahoo Mail, Hotmail, etc.

Just a really broad question.

Metho

Well, in web terms (hotmail/yahoo,ect) it's for the same reasons normally. All web systems use some standard to transmit and parse data, so these types of attacks are universal. So it's all a matter of each program having to plug up the holes.

- Methonis
Joshua "Methonis" Frazer
Support Specialist
The Simple Machines Team

CapriSkye

chinese characters always get treated as illegal characters..... :(

[Unknown]

Hmm... darn, let's see what I can do about this...

-[Unknown]

sosimple

Quote from: 127.0.0.1 on October 16, 2004, 05:11:55 PM
No no. This question has nothing to do with SMF. I mean in general with computers. There's illegal characters in Windows, illegal characters when you sign up for Yahoo Mail, Hotmail, etc.

Just a really broad question.

Every computer operating system uses various "special" characters to control the operation of commands that it processes. In a broad sense, considering many operating systems and scripting languages, these "special" characters could be nearly any character that is not a letter or number ... usually many "punctuation" characters are considerd "special" and are not allowed filenames.

Some examples ...
'#' sometimes indicates that what follows is a comment.
'<' and '>' are used for input and output redirection.
'|' sends output characters of a program to the input of another.
'*' and '?' are used as wildcards.
' ' and can have special meaning for certain commands
'\' or '/' can be used to separate file paths

In scripts, ' [ ] ( ) @ ; ' and other characters are used in particular ways.

So, specifying these "illegal" characters within a filename could be (would be) misinterpreted when the filename is passed to the command processor, so for that reason, those characters are not allowed in filenames.

Of course, it's probably possible to design operating systems to allow any character in filenames, but that is just not the case with Unix/Linux or Windows.

- Kevin

Eliana Tamerin

Why did this need to be brought up? It's a really old topic and, as far as I can see, not really an issue any longer. Is it?

Better thing, I think, would be to start a new topic and link to the old one, so these old topics are dredged up out of the netherworlds. ;)

Anyways, a good insight and helpful for those who don't understand the inner workings of code as well as some.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Advertisement: