Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => SMF Feedback and Discussion => Topic started by: 127.0.0.1 on October 16, 2004, 02:10:45 PM

Title: Illegal Characters
Post by: 127.0.0.1 on October 16, 2004, 02:10:45 PM
Why are there such a thing as illegal characters in filenames, etc.?
Title: Re: Illegal Characters
Post by: Metho on October 16, 2004, 02:19:03 PM
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
Title: Re: Illegal Characters
Post by: [Unknown] on October 16, 2004, 04:18:28 PM
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]
Title: Re: Illegal Characters
Post by: 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.
Title: Re: Illegal Characters
Post by: Metho on October 16, 2004, 05:16:42 PM
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
Title: Re: Illegal Characters
Post by: CapriSkye on October 16, 2004, 11:09:56 PM
chinese characters always get treated as illegal characters..... :(
Title: Re: Illegal Characters
Post by: [Unknown] on October 16, 2004, 11:51:42 PM
Hmm... darn, let's see what I can do about this...

-[Unknown]
Title: Re: Illegal Characters
Post by: sosimple on June 07, 2008, 06:46:58 PM
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
Title: Re: Illegal Characters
Post by: Eliana Tamerin on June 08, 2008, 12:27:49 PM
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.