Default File Upload Types

AI 生成的摘要

The discussion revolves around the default file upload types in Discourse, with user strager noting that common file types like Word Docs, Excel Sheets, and PDFs are not enabled by default, making the upload options restrictive strager. codinghorror explains that enabling such file types poses significant security risks, as they could be exploited for malicious purposes, and suggests enabling them only when necessary on individual instances codinghorror. Bill_S questions the actual risk of allowing PDFs, and codinghorror emphasizes that unless users frequently need to upload PDFs, it’s safer to keep them disabled codinghorror. strager then asks if using a Google Docs plugin, which stores files on Google Drive, carries the same security concerns, prompting DeanMarkTaylor to explain that Google Drive performs virus scanning on files, though only those under 25 MB can be scanned DeanMarkTaylor. Andro revisits the topic years later, questioning the security risks of PDF uploads, to which sam responds that modern PDF clients and browsers like Firefox with native rendering reduce these risks, but still notes that most Discourse forums don’t require PDF uploads, so the current default is reasonable sam.

So it came to my attention today that by default (or at least here on Meta) there are a few major file types missing from the upload option. It would be great if the default (and Meta) allowed users to upload file types such as Word Docs, Excel Sheets, PDFs, etc. as these are the most likely files users would want to upload.

Below are the options on our own instance which I am fairly confident have not been changed - this is extremely restrictive.

2 个赞

Those would be potential security exploits if enabled globally. I suggest just enabling what you need on your instance as you see fit.

4 个赞

How much of a security risk do you think adding pdf extensions would be?

High. Do users regularly need to upload PDFs?

1 个赞

No, I don’t allow file uploads either. I was just checking best practices.

1 个赞

@codinghorror - would the plugin at https://meta.discourse.org/t/google-docs-onebox-for-discourse/26247/29 have the same security implications since the files are stored on Google Drive? I wouldn’t think so, but figured I’d check with you before I brought the idea to Bill…

Google Drive has a virus scanning policy which reduces the risks:

Virus scanning: Google Drive scans a file for viruses before the file is downloaded or shared. If a virus is detected, users can’t share the file with others, send the infected file via email, or convert it to a Google Doc, Sheet, or Slide, and they’ll receive a warning if they attempt these operations. The owner can download the virus-infected file, but only after acknowledging the risk of doing so.

Only files smaller than 25 MB can be scanned for viruses. For larger files, a warning is displayed saying that the file can’t be scanned.

2 个赞

我知道这已经是五年前的事情了,但我认为我的问题仍然切题。允许上传 PDF 文件会带来哪些安全风险和问题?

在现代 PDF 阅读器上,这通常是比较安全的:

如今,Firefox 内置了原生渲染器,进一步降低了风险。

尽管如此,我认为绝大多数 Discourse 论坛并不需要启用此功能,因此我们当前的默认设置完全合适。

2 个赞