Page MenuHomePhabricator

Files via email (some) seem not to set author or to mirror "normal" task policy
Closed, ResolvedPublic


I'm not sure whether to file this as two things, guessing you guys will sort me out :)

When I respond to a ticket with a reply and attach a file I see the comment appear and the file is associated. The file does not mimic the behavior of drag and drop policy wise. It is public. Where if I were to perform the same action via the UI it would be set to viewPolicy: myPHID and the task mention would allow task viewers to access it. This has bitten us a few times in that the difference in outcome depending the medium is hard to communicate to users and I think is not least suprise.

Can we have files via email mimic their drag and drop counterparts for policy?

When I send that reply with an attached file it gets associated with the task and the policy is public (as noted), but the additional bummer is authorPHID seems to be set to NULL. I can only confirm this on our install, but the behavior seems to translate to this instance. That means when I send in a file via email to a restricted task it is uploaded, made public, and I am restricted from editing/deleting it as not the author.

This is a file I have attached to a reply on our instance.

In the DB:

              id: 107471
            phid: PHID-FILE-haeskypsdagxvvunrfoq
            name: 76HA09d.jpg
        mimeType: image/jpeg
        byteSize: 89971
   storageEngine: blob
   storageFormat: raw
   storageHandle: 20426
     dateCreated: 1427819095
    dateModified: 1427819095
      authorPHID: NULL
       secretKey: foryourprotection
     contentHash: 4b9c8b42eab462fbf41ae7d753402b047a1dad45
        metadata: {"width":633,"height":859}
             ttl: NULL
isExplicitUpload: 0
         mailKey: foryourprotection
      viewPolicy: public

So I see:

Screen_Shot_2015-03-31_at_12.02.25_PM.png (281×1 px, 31 KB)

File I have sent into this instance:

Screen_Shot_2015-03-31_at_12.05.10_PM.png (367×1 px, 129 KB)

I think here it was intended to set the author on attachment handling via replyhandler (which is to say I think this used to work?):

Event Timeline

chasemp raised the priority of this task from to Needs Triage.
chasemp updated the task description. (Show Details)
chasemp added a subscriber: chasemp.

Yeah, I think there are two main issues here:

  • We use the default policy (like dropping files onto the home page), but a restrictive policy makes more sense.
  • We don't set the correct author because we don't know who the author is at the time we create the file. After we resolve the author, we should go back and attribute all the files that came with the mail.
epriestley triaged this task as Normal priority.
epriestley added a project: Policy.