Modify

Opened 13 years ago

Closed 12 years ago

#2437 closed Bug (Wont Fix)

IniWriteSection does not sufficiently control the "data" parameter.

Reported by: helloyou_tos_jg@… Owned by:
Milestone: Component: AutoIt
Version: 3.3.8.1 Severity: None
Keywords: IniWriteSection Cc:

Description

For this code :

IniWriteSection (@ScriptDir & "\myIni.ini", "MySection", "MyKey1=MyValues2" & @LF & "MyKey2")

the return should be 0 and @error = 1 because the data format is invalid.

For this code :

IniWriteSection ($ini, "MySection", "MyKey1=MyValue1" & @LF & "MyKey1=MyValue2")

the MyKey1 should not be written two times.

Attachments (0)

Change History (3)

comment:1 by Matt Diesel, 13 years ago

No issue here in the example, as an ini file will still work when multiple keys have the same name (the first defined value will be returned by IniRead, so MyValue1). If you want unique keys then this is up to the programmer to implement.

However, absolutely no checking is done on the string format at all, so completely invalid strings can still be written. That is more of an issue.

I still believe it is up to programmer to make sure the data they are writing is correct though.

comment:2 by helloyou_tos_jg@…, 13 years ago

Thank for this fast answer.
It's not a problem to check to format (for me).
Maybe you can add a remark in the helpfile about this.
Good luck

comment:3 by Jon, 12 years ago

Resolution: Wont Fix
Status: newclosed

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.