DC++ accepts relative path for download directories and it can cause assertion failure and other problems

Bug #655854 reported by eMTee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DC++
New
Medium
Unassigned

Bug Description

#1 finished download directory

While the current DC++ gui (QueueFrame) can handle only absolute path's starting with <drive>: the lib accepts relative ones for the Default Download Directory setting. If you specify relative or UNC path for default download directory they pass QueueManager::checkTarget and then cause an assertion failure in QueueFrame line 457.
After a download finished in a release build UNC path causes a temporary freeze and the file stucks in the unfinished folder. In case of a relative path set for downloads the file will be created relative to the directory which was current when the DC++ executable started. This can result creation of downloaded files/folders in arbitrary places of the file system.

#2 unfinished download directory

The setting accepts relative path as well and there's no any further path check in this case. So the actual path where the unfinished files created (QueueManager::setFile) will be relative to the directory which was current when the DC++ executable started (which is not necessarily the program directory). This can result creation of Incomplete folders in arbitrary places of the file system and can reset unfininished downloads between sessions.

Thanks Thor for reporting issue #2 which led to further investigation of this problem.

Tags: core
eMTee (realprogger)
description: updated
Revision history for this message
Jacek Sieka (arnetheduck) wrote :

Hm, the question is whether this is a feature or a problem =) Perhaps it could be made into a feature by being realtive to the users home folder, or possibly documents...any opinions? On the other hand, what's the value in specifying it relative? Porting the queue between users?

In any case, there's no reason not tu support unc paths although care should be taken since they can be 65k chars long...

Revision history for this message
eMTee (realprogger) wrote :

I think if we allow relatives for Finished downloads it should be relative to the default finished downloads directory which depends on the dcppboot.xml setting. For unfinished, I wouldn't allow relative, and unc also questionable for storing a temp file...

Fredrik Ullner (ullner)
tags: added: core
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.