Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit 25186f8

Browse files
committed
Very minor security fix.
`informativeTextWithFormat` interprets its string as a format. `[error localizedDescription]` could contain string formatting specifiers. Fixes to use @"%@", [error localizedDescription] instead. Spotted via compiler warning.
1 parent 69da97c commit 25186f8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Example/Classes/Models/Tweet.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ + (void)publicTimelineTweetsWithBlock:(void (^)(NSArray *tweets))block {
6767
#if __IPHONE_OS_VERSION_MIN_REQUIRED
6868
[[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error", nil) message:[error localizedDescription] delegate:nil cancelButtonTitle:nil otherButtonTitles:NSLocalizedString(@"OK", nil), nil] show];
6969
#else
70-
[[NSAlert alertWithMessageText:NSLocalizedString(@"Error", nil) defaultButton:NSLocalizedString(@"OK", nil) alternateButton:nil otherButton:nil informativeTextWithFormat:[error localizedDescription]] runModal];
70+
[[NSAlert alertWithMessageText:NSLocalizedString(@"Error", nil) defaultButton:NSLocalizedString(@"OK", nil) alternateButton:nil otherButton:nil informativeTextWithFormat:@"%@",[error localizedDescription]] runModal];
7171
#endif
7272
if (block) {
7373
block(nil);

0 commit comments

Comments
 (0)