# 因 Privacy Badger 下载附件后出现“您已退出登录”

**URL:** <https://meta.discourse.org/t/you-were-logged-out-after-downloading-an-attachment-due-to-privacy-badger/109714>\
**Category:** Support\
**Created:** [2019年二月21日 00:34 UTC](https://meta.discourse.org/t/you-were-logged-out-after-downloading-an-attachment-due-to-privacy-badger/109714 "2019-02-21T00:34:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tfoote](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tfoote/32/120929_2.png) [@tfoote](https://meta.discourse.org/u/tfoote)\
**Post date:** [2019年二月21日 00:34 UTC](https://meta.discourse.org/t/you-were-logged-out-after-downloading-an-attachment-due-to-privacy-badger/109714/1 "2019-02-21T00:34:57Z")

</div>

Logged into my site when I click on an attachment, a popup comes up and tells me that I’ve been logged out, and provides a refresh button. Clicking that or refreshing and I’m logged back in.

I can reproduce by downloading the survey pdf from this post:

> **[Autoware 2019 Survery](https://discourse.openrobotics.org/t/autoware-2019-survery/7521/2?u=tfoote)**
>
> Hi, the results of Autoware 2019 User Survey are in. We got 13 valuable responses, enjoy: Autoware Survey.pdf (746.3 KB)

Then sometimes when I navigate to the next page, or sometimes immediately after the download without any interaction I get this popup.

 ![you_were_logged_out](https://global.discourse-cdn.com/meta/original/3X/c/d/cd1088732eb84bfc5ffb400a96f582a33f07ca42.png)

Clicking refresh or reloading the page will result in being logged in again but on the home page not the page I was expecting to go to. But I’ve been seeing this for a while and it’s just slightly annoying to get these warnings that require one extra step and get me used to ignoring warnings on the site.

Here’s it in a gif:

 ![logout%20after%20download](https://global.discourse-cdn.com/meta/original/3X/4/a/4ab4109a4e6e9ae5f96f401e7d576066c23f9620.gif)

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2019年二月21日 02:10 UTC](https://meta.discourse.org/t/you-were-logged-out-after-downloading-an-attachment-due-to-privacy-badger/109714/2 "2019-02-21T02:10:53Z")

</div>

Are you using any browser plugins? Any local antivirus or “protection” that would deal with downloaded files? That’d be my very first guess. Maybe try in a different browser you don’t normally use, or [safe mode](https://meta.discourse.org/t/53504?silent=true) in your current browser.

Can you repro this on your mobile phone with wifi turned off? That would simultaneously rule out browser plugins and desktop antivirus software _and_ any upstream networking devices in one swell foop.

---

<div class="post-metadata">

**Author:** ![tfoote](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tfoote/32/120929_2.png) [@tfoote](https://meta.discourse.org/u/tfoote)\
**Post date:** [2019年二月21日 03:02 UTC](https://meta.discourse.org/t/you-were-logged-out-after-downloading-an-attachment-due-to-privacy-badger/109714/3 "2019-02-21T03:02:32Z")

</div>

I did find a warning in the console when downloading the attachment

```plaintext
_application-b340ff561f4deaf627006a01fbc69a9abc5cee80ab3cf0367803a94f9f22cb21.js:10740 Resource interpreted as Document but transferred with MIME type application/pdf: "https://discourse-cdn-sjc2.com/standard17/uploads/ros/original/2X/1/19bddd29016a5fbec4040bacf13ed7a6b434f168.pdf".
redirectTo @ _application-b340ff561f4deaf627006a01fbc69a9abc5cee80ab3cf0367803a94f9f22cb21.js:10740
trackClick @ _application-b340ff561f4deaf627006a01fbc69a9abc5cee80ab3cf0367803a94f9f22cb21.js:18931
(anonymous) @ _application-b340ff561f4deaf627006a01fbc69a9abc5cee80ab3cf0367803a94f9f22cb21.js:44634
dispatch @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:5198
g.handle @ _ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js:5006

```

But I think it’s potentially unrelated.

I isolated it to be using the [EFF Privacy Badger](https://www.eff.org/privacybadger) Chrome Extension which was blocking cookies for the domain `discourse.ros.org` specifically.

 ![discourse_cookies_privacy_badger](https://global.discourse-cdn.com/meta/original/3X/8/2/82eeddf3cceea539ff8bdda705777d7c78b28987.png)

However that domain only comes up in the case that I navigate through the attachment.

Privacy badger usually doesn’t list it when browsing the site before downloading the attachment so I didn’t know it was blocking.

 ![no_main_cookie](https://global.discourse-cdn.com/meta/original/3X/f/9/f955e53dab1eb6afc0879c8842d3cd2eb5385b8d.png)

I’m not sure when Privacy Badger learned to flag the site. I reset it and cleared the flag and it now shows a DNT and is happy with the site by default.

 ![dnt_discourse_ros_org](https://global.discourse-cdn.com/meta/original/3X/e/4/e41a11f2566fc151e19f3a53338cf2153f1916df.png)

I noticed that it seems to loose the Local storage and Session storage when I download the attachment which seems odd. And this happens with Privacy Badger disabled.

 ![cookies_before](https://global.discourse-cdn.com/meta/original/3X/f/0/f05c66e7829b24d272a7a631b624c96b8d2daf52.png)

vs after the download

 ![cookies_after](https://global.discourse-cdn.com/meta/original/3X/c/0/c09eb7764497bf9bf70f8d0c60702c1be9db9e21.png)

This seems odd to me, but if it seems ok to you there’s no need to follow up. I’m happy with the results. Thanks for your time.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2019年二月21日 03:09 UTC](https://meta.discourse.org/t/you-were-logged-out-after-downloading-an-attachment-due-to-privacy-badger/109714/4 "2019-02-21T03:09:08Z")

</div>

Good sleuthing! Thank you, hopefully this can help others in the future. 🕵️‍♂️

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2019年三月23日 03:09 UTC](https://meta.discourse.org/t/you-were-logged-out-after-downloading-an-attachment-due-to-privacy-badger/109714/5 "2019-03-23T03:09:09Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
