Commit 7b10f2ff authored by darin's avatar darin
Browse files

Reviewed by Chris.

	- second pass on 3143332 - we still need a test case to be sure this is right

        * Plugins.subproj/WebBaseNetscapePluginStream.m:
        (-[WebBaseNetscapePluginStream finishedLoadingWithData:]):
	Check for "/". Also report the failure instead of just hanging on forever.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 88b01630
2003-01-09 Darin Adler <darin@apple.com>
Reviewed by Chris.
- second pass on 3143332 - we still need a test case to be sure this is right
* Plugins.subproj/WebBaseNetscapePluginStream.m:
(-[WebBaseNetscapePluginStream finishedLoadingWithData:]):
Check for "/". Also report the failure instead of just hanging on forever.
2003-01-09 Darin Adler <darin@apple.com>
Reviewed by Richard.
......
......@@ -136,7 +136,14 @@ - (void)finishedLoadingWithData:(NSData *)data
}
NSString *filename = [[URL path] lastPathComponent];
if ([filename length] == 0 || [filename isEqualToString:@"."] || [filename isEqualToString:@".."]) {
// It's very important to not do the below calls, like "removeFileAtPath:", on empty paths.
// That's the way you lose your "/tmp" directory.
if ([filename length] == 0
|| [filename isEqualToString:@"."]
|| [filename isEqualToString:@".."]
|| [filename isEqualToString:@"/"]) {
[self destroyStreamWithReason:NPRES_NETWORK_ERR];
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment