Proposal for Limiting the Length of WML Names

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Post Reply
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Proposal for Limiting the Length of WML Names

Post by Dave »

I'm going to propose that we limit the length of WML element and attribute names to 32 characters.

The reason for this limit is because with the way WML compression works, very long element or attribute names could be used to perform DoS attacks on the server.

Are there any reasons why this shouldn't be done?

Length of attribute values would be unaffected.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
User avatar
Viliam
Translator
Posts: 1341
Joined: January 30th, 2004, 11:07 am
Location: Bratislava, Slovakia
Contact:

Post by Viliam »

Limiting names to a reasonable length seems OK to me. However, 32 is not enough, see translation files:

"A_Choice_Must_Be_Made_objectives" - 32
"Brother_Against_Brother_objectives" - 34
"Plunging_into_the_Darkness_objectives" - 37
"The_Valley_of_Death-The_Princesss_Revenge_objectives" - 52

IMHO scenario writers should use a bit shorter id's. But as situation is now, 32 is not enough... make it 64, or perhaps 255.
Dacyn
Posts: 1855
Joined: May 1st, 2004, 9:34 am
Location: Texas

Post by Dacyn »

Viliam wrote:"The_Valley_of_Death-The_Princesss_Revenge_objectives" - 52
That name should be shortened anyway - it forces the game to scroll when saving games on that level.
User avatar
Viliam
Translator
Posts: 1341
Joined: January 30th, 2004, 11:07 am
Location: Bratislava, Slovakia
Contact:

Post by Viliam »

Dacyn wrote:That name should be shortened anyway - it forces the game to scroll when saving games on that level.
Each scenario has a name and an id. I am not sure, but I think the names are used for savefile names, not id's. However, to make the name shorter too, seems like a good idea.
Dacyn
Posts: 1855
Joined: May 1st, 2004, 9:34 am
Location: Texas

Post by Dacyn »

Viliam wrote:Each scenario has a name and an id.
Yes I know. In fact I wrote the wiki page on scenarios :)
Viliam wrote:I am not sure, but I think the names are used for savefile names, not id's.
yes; the IDs are seen in-game only in the case of an error.
Viliam wrote:However, to make the name shorter too, seems like a good idea.
Well usually the names and IDs are basically the same, so if one is changed the other will likely be changed too.
Post Reply