Closed Bug 445554 Opened 17 years ago Closed 17 years ago

MsgMailboxGetURI doesn't escape the relative path as should be done for a URL

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b1

People

(Reporter: rain1, Assigned: rain1)

References

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

Because of changes in bug 433697, the relative path of the folder inside the root folder isn't escaped. (getRelativeDescriptor doesn't escape the path.)
Attachment #329869 - Flags: superreview?(bienvenu)
Attachment #329869 - Flags: review?(bienvenu)
Summary: MsgMailboxGetURI doesn't escape the relative path as should be done for a → MsgMailboxGetURI doesn't escape the relative path as should be done for a URL
Attachment #329869 - Flags: superreview?(bienvenu)
Attachment #329869 - Flags: superreview+
Attachment #329869 - Flags: review?(bienvenu)
Attachment #329869 - Flags: review+
Keywords: checkin-needed
Checking in mailnews/base/util/nsMsgUtils.cpp; /cvsroot/mozilla/mailnews/base/util/nsMsgUtils.cpp,v <-- nsMsgUtils.cpp new revision: 1.151; previous revision: 1.150 done
Keywords: checkin-needed
Target Milestone: --- → mozilla1.9.1a1
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Product: Core → MailNews Core
Reopened because the fix is incorrect -- it only works for local folders, not for IMAP. In fact, IMAP folders don't escape spaces, so the patch fixes the local folder case but breaks IMAP folders with spaces.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Ugly hack, but discussion over IRC led me to believe that this way will work best.
Attachment #343625 - Flags: superreview?(bienvenu)
Attachment #343625 - Flags: review?(bienvenu)
Comment on attachment 343625 [details] [diff] [review] Now escapes only for a local folder I think the patch is OK, but I think this would all be a bit easier to understand if we fixed some function and var names. MsgMailboxGetURI is a misleading name (and I bet I either wrote this method or reviewed it, so my bad) and in nsMessengerBootstrap, the code that calls MsgMailboxGetURI uses the name msgFolder for a local file object, not an nsIMsgFolder. So I think we should change some names here, while there's only one caller. Maybe something like MsgGetFolderUriFromProfilePath? and maybe msgFolder should be folderProfilePath?
Attachment #343625 - Flags: superreview?(bienvenu)
Attachment #343625 - Flags: superreview+
Attachment #343625 - Flags: review?(bienvenu)
Attachment #343625 - Flags: review+
After discussion on IRC, MsgMailboxGetURI was changed to FolderUriFromDirInProfile, which is unambiguous as to the purpose of the function. In HandleIndexerResult, folderPath has been changed to folderPathStr, and msgFolder to folderPath.
Attachment #343625 - Attachment is obsolete: true
Attachment #344108 - Flags: superreview+
Attachment #344108 - Flags: review+
Keywords: checkin-needed
Comment on attachment 344108 [details] [diff] [review] [checked in] update addressing review comments Checked in: http://hg.mozilla.org/comm-central/rev/f63c0bb551a6
Attachment #344108 - Attachment description: [to checkin] update addressing review comments → [checked in] update addressing review comments
Keywords: checkin-needed
Target Milestone: mozilla1.9.1a1 → Thunderbird 3.0b1
Status: REOPENED → RESOLVED
Closed: 17 years ago17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: