Skip to content

Bug: efc-store-root-selection-leaks-full-outlook-path-into-filing-boundary #614

Description

@drmoisan
  • Work Mode: full-bug

Summary

Filing an email from the Email Filer Controller (EFC) throws ArgumentException from
FolderConverter.ToFsFolderpath because a full Outlook hierarchy path (the mailbox store root,
e.g. \\mailbox@example.com) reaches EmailFilerConfig.DestinationOlStem, which by contract must
be an archive-relative stem. The reported "illegal character" (the . in the mailbox address) is a
downstream symptom of a path-representation contract that is enforced at no boundary; the true
defect set spans breadcrumb hierarchy selection, archive-root resolution, special-folder
resolution, and the Outlook-path-to-filesystem-path converter itself.

Environment

  • OS/version: Windows 11 Pro 10.0.26200; Outlook desktop with a Microsoft 365 mailbox whose store
    display name is the account email address.
  • Python version: Not applicable; the affected implementation and tests are C# (.NET Framework
    4.8.1 VSTO add-in).
  • Command/flags used: Not applicable; reached interactively through the EFC folder-list breadcrumb
    surface and the OK button.
  • Data source or fixture: Archive root \\mailbox@example.com\Archive; OneDrive commercial root
    C:\Users\<user>\OneDrive - <Org>.

Steps to Reproduce

  1. Open the QuickFiler EFC surface against a mailbox whose store root path is
    \\mailbox@example.com and whose archive root is \\mailbox@example.com\Archive.
  2. Bind folder rows so that a breadcrumb row renders its ancestor chain
    (IFolderHierarchyProvider.GetAncestorChainAsync, which is requested with
    FolderTreeRequest.AllStores and therefore walks all the way up to the store root).
  3. Activate an ancestor segment at or above the archive root. In the observed case this was the
    store-root segment itself.
  4. Press OK to execute the move.

Expected Behavior

Either the segment at or above the archive root is not selectable as a filing destination, or the
selection is clamped or rejected before it reaches the filing boundary. Every value that flows into
EfcDataModel.MoveToFolderAsync and EmailFilerConfig.DestinationOlStem remains an
archive-relative stem (for example Clients\North), and FolderConverter.ToFsFolderpath validates
only the segments it derives, never the caller-supplied filesystem ancestor root, which
legitimately contains ., spaces and -.

Actual Behavior

ArgumentException is thrown and the move fails:

System.ArgumentException: fsPathExDividers has a value of
Users<user>OneDrive - <Org>mailbox@example.com which contains illegal characters .
Parameter name: fsPath
   at UtilitiesCS.FolderConverter.ToFsFolderpath(String olBranchPath, String olAncestorPath, String fsAncestorEquivalent, Boolean ask) in UtilitiesCS\OutlookObjects\Folder\FolderConverter.cs:line 169
   at UtilitiesCS.EmailIntelligence.EmailParsingSorting.EmailFilerConfig.ResolvePaths(Folder currentFolder) in UtilitiesCS\EmailIntelligence\EmailParsingSorting\EmailFilerConfig.cs:line 188
   at UtilitiesCS.EmailIntelligence.EmailParsingSorting.EmailFiler.ResolvePaths(Folder currentFolder) in UtilitiesCS\EmailIntelligence\EmailParsingSorting\EmailFiler.cs:line 378
   at UtilitiesCS.EmailIntelligence.EmailParsingSorting.EmailFiler.SortAsync(...) in UtilitiesCS\EmailIntelligence\EmailParsingSorting\EmailFiler.cs:line 133
   at QuickFiler.Controllers.EfcDataModel.MoveToFolderAsync(...) in QuickFiler\Controllers\EfcDataModel.cs:line 293
   at QuickFiler.EfcHomeController.ExecuteMovesCoreAsync() in QuickFiler\Controllers\EfcHomeController.ExecuteMoves.cs:line 75
   at QuickFiler.EfcHomeController.ExecuteMovesAsync() in QuickFiler\Controllers\EfcHomeController.ExecuteMoves.cs:line 40
   at QuickFiler.Controllers.EfcFormController.ActionOkAsync() in QuickFiler\Controllers\EfcFormController.cs:line 716
   at QuickFiler.Controllers.EfcFormController.ButtonOK_Click(...) in QuickFiler\Controllers\EfcFormController.cs:line 441

Algebraic reconstruction of the reported message. This is the evidence that the stem, not the
character class, is the defect. ToFsFolderpath strips the first three characters (C:\) and then
removes every \, so the reported value implies:

fsPath == "C:\Users\<user>\OneDrive - <Org>" + "\" + "\\mailbox@example.com"

Working backwards through EmailFilerConfig.ResolvePaths:

DestinationOlPath = OlAncestor + "\" + DestinationOlStem
fsPath            = DestinationOlPath.Replace(OlAncestor, FsAncestorEquivalent)

With OlAncestor = \\mailbox@example.com\Archive and
FsAncestorEquivalent = C:\Users\<user>\OneDrive - <Org>, the only stem that reproduces the
reported string exactly is DestinationOlStem == "\\mailbox@example.com", that is, the mailbox
store root carried through as a full Outlook path. No stem containing a real destination folder
name reproduces the message, because the message ends immediately after the mailbox address.

Logs / Screenshots

  • Attached minimal logs or screenshot
  • Snippet: the exception and stack shown above, captured at the throw site.

Impact / Severity

  • Blocker
  • High
  • Medium
  • Low

Filing fails outright for the affected selection path, and adjacent defects in the same chain can
silently produce a wrong destination rather than an exception.

Source

From: docs/features/potential/2026-08-26-efc-store-root-selection-leaks-full-outlook-path-into-filing-boundary.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions