Closed Bug 402298 Opened 15 years ago Closed 15 years ago

Random base64 file names can contain '/'

Categories

(Core Graveyard :: File Handling, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9beta1

People

(Reporter: Mardak, Assigned: Mardak)

References

Details

(Keywords: regression)

Attachments

(1 file)

Base64 has alphanumeric and '+' and '/'. This causes problems with CreateUnique after setting the leafName.
Flags: blocking1.9?
Oh, for those curious, this results in the temporary file downloads to be <parent directory>-1

e.g.,
windows: c:\doc..local settings\Temp-1, Temp-2, etc
os x: /Users/Ed/Desktop-1
he he he...

[11/02/2007 14:39:12] <Mardak> unless there's some non-determinism [...] i would assume it gives the same results each time 

I guess we know where the non-determinism is coming from ;)

1 illegal character out of 64.. picking 8 characters: probability of a filename without an illegal character: (63/64)^8 = 88% of the time -> one in 8.4 downloads.
Attached patch v1Splinter Review
die slash die.
Assignee: nobody → edilee
Status: NEW → ASSIGNED
Attachment #287186 - Flags: superreview?(cbiesinger)
Attachment #287186 - Flags: review?(cbiesinger)
This should block due to the issues it causes.
Target Milestone: --- → mozilla1.9 M9
Yes, this is needed to fully resolve an existing blocker.
Flags: blocking1.9? → blocking1.9+
Comment on attachment 287186 [details] [diff] [review]
v1

r+sr=jst to get this in for beta.
Attachment #287186 - Flags: superreview?(cbiesinger)
Attachment #287186 - Flags: superreview+
Attachment #287186 - Flags: review?(cbiesinger)
Attachment #287186 - Flags: review+
Checking in uriloader/exthandler/nsExternalHelperAppService.cpp;
/cvsroot/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp,v  <--  nsExternalHelperAppService.cpp
new revision: 1.355; previous revision: 1.354
done

I suppose for a testcase, we would have to generate a large number of calls to SetUpTempFile and see if any randomly turn out to be "Desktop-1" or "Temp-1" instead of "<file>.<ext>.part".

For litmus.. "start a bunch of open-with downloads and see if they create a the correct temporary file"
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite?
Flags: in-litmus?
Keywords: regression
Resolution: --- → FIXED
Blocks: 400076
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.