Closed Bug 1057599 Opened 10 years ago Closed 10 years ago

Don't forbid profile directory as parent directory of account folder if it isn't in the default location

Categories

(MailNews Core :: Account Manager, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: aryx, Unassigned)

Details

(Whiteboard: [fix in comment 4])

Thunderbird 31.0 on Windows 8.1, should also be on Daily because source file hasn't been changed in it

If the user set a custom account storage location which is in the profile directory but not in the default folder for that account type, e.g. has set a news account to be stored in ProfD/Mail/mynewsaccount instead of ProfD/News/mynewsaccount, the account manager complains about an illegal configuration.

http://mxr.mozilla.org/comm-release/source/mailnews/base/prefs/content/AccountManager.js#384

      let defaultPath = currentAccount.incomingServer.protocolInfo.defaultLocalPath;
      if (defaultPath) {
        defaultPath.normalize();
        if (defaultPath.contains(aLocalPath, true))
          return true; // location allowed

else with testDir as profile directory:

    if (testDir.contains(aLocalPath, true)) {
      if (!("safeSubdirs" in aDirToCheck)) // always true
        return false; // not allowed

In my opinion, Thunderbird should allow account location which are subfolders of the profile directory. (Have seen the issue twice in support this week.)
(In reply to Archaeopteryx [:aryx] from comment #0)
> Thunderbird 31.0 on Windows 8.1, should also be on Daily because source file
> hasn't been changed in it
> 
> If the user set a custom account storage location which is in the profile
> directory but not in the default folder for that account type, e.g. has set
> a news account to be stored in ProfD/Mail/mynewsaccount instead of
> ProfD/News/mynewsaccount, the account manager complains about an illegal
> configuration.
I am not sure the AM would cope if you then created a new MAIL account called mynewsaccount and whether it would properly name the directory 'mynewsaccount-1'.


> In my opinion, Thunderbird should allow account location which are
> subfolders of the profile directory. (Have seen the issue twice in support
> this week.)
The large part of the feature is specifically to disallow any random subfolder of profile folder. Because we (or even extensions) may start using some subfolders for other stuff and that would cause havoc. The only allowed ones are Mail and News because they have a defined use and no code should start to use them for anything else.
(In reply to :aceman from comment #1)
> (In reply to Archaeopteryx [:aryx] from comment #0)
> > ...
> > In my opinion, Thunderbird should allow account location which are
> > subfolders of the profile directory. (Have seen the issue twice in support
> > this week.)
> The large part of the feature is specifically to disallow any random
> subfolder of profile folder. Because we (or even extensions) may start using
> some subfolders for other stuff and that would cause havoc. The only allowed
> ones are Mail and News because they have a defined use and no code should
> start to use them for anything else.

Agreed, we have enough profile issues without giving users a footgun to potentially cause more. I think this should be closed WONTFIX.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
does that mean that the problem will never be fixed
It can be fixed by the user by moving the accounts for the folders into the correct directories of the profile or using a folder outside the profile directory. For new installations, the user will be warned when choosing an unexpected account directory location.
Whiteboard: [fix in comment 4]
I never changed the installation directories.
(In reply to Pub@salard.name from comment #3)
> does that mean that the problem will never be fixed

So what is the problem exactly?
We could actually allow to store News into /Mail or POP3 into /ImapMail (any of the 3 subfolders could be used for any of the server type). But what is it good for?
(In reply to :aceman from comment #6)
> (In reply to Pub@salard.name from comment #3)
> > does that mean that the problem will never be fixed
> 
> So what is the problem exactly?

I no longer have access to setting the outgoing server (SMTP)
Why? How does it relate to the allowed subfolders for mail discussed here?
And who set this bug to block bug 813929 and why?
(In reply to :aceman from comment #9)
> And who set this bug to block bug 813929 and why?
That was me, seems like I got the wrong bug number.
No longer blocks: 813929
You need to log in before you can comment on or make changes to this bug.