我怎么判断特定的Discourse客户端发行版是否是自由软件?

我还可以使用安全模式来了解其他 Discourse 发行版做出了哪些更改:

  • Purism 只有几个主题脚本(鉴于安全模式会阻止所有主题,这些脚本可能实际上是官方 Discourse 的一部分),以及一段内部(即,是 HTML 文件的一部分,而不是外部 JS 文件)的 JavaScript,以 const DELAY_TARGET=2e3,POLLING_INTERVAL=50,splashS 开头……
  • Exercism 似乎拥有 discourse-spoiler-alert 插件(该插件后来被添加到核心),以及与 Purism 完全相同的内部 JS。
  • FSF 会员论坛只有与另外两个完全相同的内部 JS。
  • Discourse Meta(本论坛)似乎有许多 JS 差异。
    • discourse-activity-pub
    • discourse-customer-flair-plugin(我似乎在哪里都找不到此插件的许可证)
    • discourse-deprecation-collector
    • discourse-doc-categories
    • discourse-new-features-feeds(此插件也未找到许可证)
    • 还有许多其他脚本,包括一些甚至没有指向源映射的链接。

因此,看起来大多数第三方发行版(基于我小小的 3 个样本)都与主线 Discourse 非常接近,但这又使得这个发行版看起来包含了很多非大多数发行版都包含的插件。您知道在哪里可以找到所有这些插件的授权源代码吗?它们会在主存储库中吗?我尝试在主存储库中搜索其中一些名称,但似乎没有找到,不过也有可能是我错过了。

从这里开始,显而易见,因为其中大部分不是第三方,而是第一方 :smirking_face:

您应该查看 PluginTheme component 类别。但您也会发现 DevDocumentation 等内容很有趣。

2 个赞

我在整个论坛搜索了“discourse-new-features-feeds”(例如),但一无所获。对于一些扩展,我在插件目录、GitHub 或论坛上找到了它们,但对于 discourse-new-features-feeds 和 discourse-customer-flair-plugin,我却一无所获。我没有检查每一个插件脚本,所以可能还有更多我找不到的东西。

我猜想可能有原因,例如 Meta 自行定制的内容并未公开。或者你没有深入挖掘 Discourse 的代码库 :man_shrugging:

2 个赞

有可能他们是企业客户,并且专门定制了 Discourse 论坛。\n另外,如果你想使用安全模式来查看客户端自定义设置,这会不会反而禁用它?你该如何首先在这些网站上启用它?

2 个赞

出于好奇,我想知道这背后的确切原理是什么。你提出的这些顾虑,是不是意味着根本无法浏览互联网了?

你说的是“许可证”。但你作为一个普通用户使用特定论坛的许可证,与运行论坛软件本身的许可证(=如果有人想用它来建立另一个论坛)是不同的。用户为什么会关心后者呢?是因为他想遵守某些原则吗?我想任何未经重新分发的定制都将是“专有的”。这就引出了这个问题:这种行为从哪里开始,又在哪里结束。

你可以警惕 JavaScript 以及它可能在你的浏览器中运行的内容(这方面的风险和可能性经常被争论。它应该受到限制)。但我不太确定 Discourse 是否可以在没有 JavaScript 的情况下运行,或者至少能正确运行。你总是可以试试。例如,有一个流行的“NoScript”浏览器扩展程序可以做到这一点。

我仍然想知道其中的推理:是为了潜在的恶意代码吗?在这种情况下,你觉得拥有一个声明论坛运行的是未修改版本的许可证会让你感觉更好,这对我来说没有多大意义。或者,这又是关于什么的呢?

4 个赞

一般来说,我希望避免运行非自由软件。主要原因是,我认为我应该能够控制在我电脑上运行的软件,另外一个原因是,我不喜欢可能存在非法修复的错误的想法。我也认为,如果我能从少数几个受信任的存储库获取软件,而不是从数百个没有第三方监督或问责制的独立网站下载软件,那将是件好事,因此,我能够自由地为我信任的存储库打包我使用的软件对我来说很重要(尽管由于当前的技术,对于网站提供的 JavaScript 来说,这相当不切实际)。

我认为我不应该控制他人电脑上运行的软件,因为我认为服务器运营商应该拥有这种控制权,而且在我看来,让多个用户完全控制软件是没有意义的。

不,如果你不使用会自动从不受信任的方下载和运行任意代码的程序,或者你修改了这些程序使其不这样做(例如,在你的网页浏览器中安装 LibreJS),那么在互联网上相对容易避免运行非自由软件。

据我所知,运行论坛软件是使用论坛的大多数功能所必需的,尽管阅读帖子在没有它的情况下也可以进行。如果我想注册一个账户并发布主题,似乎我必须运行论坛软件。大多数人没有意识到这一点,因为大多数浏览器会下载并运行网站发送的任何软件,而不会通知用户。

一些论坛软件运行在服务器上,然后 Discourse 实例不一定会分发该软件,这意味着我可能甚至不会获得实例添加到服务器端的任何非自由软件,所以我不会试图避免执行此操作的实例。

关于定义的附注

在我看来,从不分发的软件是“专有的”,因为它有一个“所有者”(作者),但它也是“自由的”,因为它的所有用户(只有一个,即作者)都可以自由地对其做任何他们想做的事情。嗯,我想你可以说与服务器交互的人是该服务器上软件的“用户”,所以也许我应该使用一个不同于“用户”的词,但我不知道该用什么词。也许我只是技术上是打电话时使用的电话网络或他人手机上运行的软件的“用户”。

是的,我安装了 NoScript,当我阻止客户端的 Discourse 软件时,当然 Discourse 无法在没有它的情况下“运行”,因为我已经阻止了浏览器运行脚本。服务器端的软件,它不在我的电脑上运行,不会被 NoScript 阻止运行。在这种状态下,Discourse 服务器软件提供的帖子和评论是可见的,但要注册和发帖,似乎你需要使用客户端的 JavaScript 软件。

关于恶意软件,如果一个自由软件程序是恶意软件,那么有人可以修改它使其不再是恶意软件,然后分发修改后的版本来替代使用。对于网站提供的 JavaScript,这目前有点不切实际。理想情况下,应该有一个许可证直接声明该软件是自由软件,这样即使软件被修改,使用自由软件仍然是合法的。目前,我不得不相信我使用的发行版不会“撒谎”,声称正在使用某个版本,而实际上是另一个版本(例如,通过修改 Discourse 服务器软件声称正在使用一个提交,而实际上是另一个)。

我可能把这个回复写得太长了,但核心是我重视软件自由,因此希望避免在我的电脑上运行非自由软件。

在这种情况下,“他们”是 Discourse Meta。这难道不是 Discourse(公司)的一部分吗?

是的,我的意思是:通过安全模式,我可以禁用修改中的脚本,然后比较两种情况下发送到浏览器的软件。区别在于修改和主题。

可以通过导航到 /safe-mode(例如 http://meta.discourse.com/safe-mode)并选择那里的选项来启用安全模式。该页面不需要 JavaScript,因此可以在使用 NoScript、LibreJS 和/或 Haketilo 等扩展来阻止 JS,或者在 Firefox 浏览器的浏览器设置中将 javascript.enabled 设置为 false 的情况下启用安全模式。

此时,您可以比较两个页面上的脚本标签,以查看安全模式移除了什么。我使用了一个类似这样的脚本:

script-diff.js
// SPDX-FileCopyrightText: 2024 Jacob K
//
// SPDX-License-Identifier: CC0-1.0

// 在有更多脚本的页面上
const scriptSrcArr = [];
for (script of document.scripts) {
  if (script.src) {
		scriptSrcArr.push(script.src);
  } else {
    scriptSrcArr.push(script.textContent);
  }
}

console.log(scriptSrcArr)

// 在有更少脚本的页面上(您需要右键单击数组并单击第一个页面上的“复制对象”)
scriptSrcArr = PASTE_OBJECT_FROM_OTHER_PAGE_HERE
for (script of document.scripts) {
  if (!scriptSrcArr.includes(script.src)) {
      console.info(script)
  }
}
// 我假设第一个页面上的脚本是第二个页面上脚本的超集

@Jagster (尝试通过编辑回复,正如 Discourse 所建议的那样(很棒的建议功能!))

这让我认为,由 meta.discourse.org 分发的 Discourse 是非自由软件,这意味着“整个 Discourse 代码库都是公开且可自由获取的”和“Discourse 是 100% 免费的,开源论坛软件。”(均来自 www.discourse.org)的说法似乎具有误导性,即使它在技术上是正确的,因为软件与插件不同。感觉我好像被骗去运行非自由软件了 :slightly_frowning_face:

我猜这个说法实际上是针对那些打算自己托管 Discourse 实例的人,而不是加入现有实例的人。

我希望我错了,而且确实是我没有仔细查看仓库。

你肯定经常有这种感觉。没有表情符号,因为这只是一个陈述,因为互联网及其应用程序就是这样运作的。

你说定制不好,如果基础是开源的,那么所有附加组件也必须是免费的。嗯,我认为 WordPress 使用了这一点,但肯定不是通过 wordpress.com,但如果你访问我的 WordPress 网站,那里有很多定制工作。有些是专有的,有些是开源的,有些是定制的,有些是我做的。而且,在这现实中,有两件事不会发生:

  • 定制工作的代码都会公开
  • 我会告诉你或任何访问者我是否有有效的许可证

但我很难理解为什么 Discourse、WordPress、Moodle 等如果某些附加组件不是免费的,为什么它们就不能是免费的。我不明白这种思维背后的逻辑。

2 个赞

这绝对是重点 :+1:
你无法预测托管商之后会如何调整它。

确实,此外,例如,托管商可以自行决定添加:

  • 广告
  • 订阅

虽然“软件”可能仍然“免费使用”,但某些功能可能会被限制,并且只有付费订阅者才能关闭广告。

并非每个人都有无限的资金来免费运行 Discourse 实例。许多网站需要创收来支付账单。

大规模运行 Discourse 永远不会是“免费”的。托管商必须支付域名、VPS 和电子邮件服务的费用,仅列举主要的几项。

(而且,让我们不要谈论 Discourse 最初的开发成本!)

4 个赞

好的,我想我明白了你的意思。

一点也不是!代码将永远是免费的。


他们自己的 Discourse 站点的管理员可以自由定制自己的论坛。插件、主题、TC 不一定非得是开源的。Discourse 对此表示赞同,因为有方法可以使用私有仓库而不是公共仓库来连接这些定制。
插件也是如此,除了在非常非常非常罕见的情况下(可能几乎从未发生过!)这些定制才需要付费[1]。所以没有什么“闭源”:一切都是免费的。
我的观点是,开源软件将是免费的。插件是免费的——你可以选择使用它们。主题、TC 等也是如此。然而,不是开源的东西可能是付费的,但管理员选择使其免费使用。如果你想尽你所能复制一个闭源定制并自己使用它,没有人会阻止你。
Discourse 是免费的,它的公共定制[2] 是免费的,它的私有定制使用起来也是免费的(至少在很多地方是这样,但

。为所有者支付源代码是另一回事。

本质上,除非你自己制作一个插件/主题/TC 并且不分享它,否则你总是可以免费安装定制。没有人会阻止你。


如果这听起来很粗鲁或生硬,或者在绕圈子和重复同样的事情,我很抱歉。


  1. 除非通过付费委托,这是你自己的选择来赞助它 ↩︎

  2. 即这里 Meta 或 GitHub 上列出的 ↩︎

1 个赞

但这些是“在”开源版本“之上”的,所以仅仅存在 CLA 并不会让 Discourse 非自由。

这不是关于免费(指金钱)而是关于自由(指“有一个非限制性许可证”)。What is Free Software? - GNU Project - Free Software Foundation

这不一定正确。再说一遍:这是关于自由(指自由),而不是关于价格。有些开源项目拥有过于严格的许可证,无法被视为 FSF 定义下的自由软件。例如 MongoDB 和 ElasticSearch。

运行自由软件并不意味着你控制了它。

所以你似乎在混淆“信任”和“自由”。当服务器管理员构建 Discourse 时,构建过程会从 NPM 下载各种软件包。这些总是可以信任的吗?(历史告诉我们事实并非如此 - 示例另一个)。

你“猜” :thinking: 服务器管理员可以在不更改提交哈希的情况下进行修改。插件也可以注入 Javascript 代码。

我很遗憾地告诉你,这是不真实的。

这与自由或非自由、开源或闭源无关,而是关于信任。

如果你访问一个 Discourse 实例,你将不得不信任

  • 服务器管理员
  • Discourse github 组织中的所有提交者
  • 插件存储库中的所有提交者
  • 所有 GitHub 用户
  • 整个 NPM 软件链
  • NPM 存储库中任何被使用的软件包的所有提交者
  • 控制你浏览器软件的所有人
  • 提供 SSL 证书和信任链的公司

这至少是几千人?

插件和主题组件可以在单独的存储库中找到。
并非所有插件都是开源的(例如,据我所知,discourse-customer-flair-plugin 就不是)。所以你看,这就是原因。你将不得不停止使用 Meta :wink: 当然只是开玩笑。我的观点是,在并非所有东西都开源或自由的情况下,也可以有足够的信任。

8 个赞

Just something, @JacobK1,你读过 Discourse 的许可证吗?

引用一些可能相关的内容:

GNU通用公共许可证旨在保证您自由共享和修改自由软件的自由——确保软件对所有用户都是自由的。

您可以修改您对程序或其任何部分的副本或副本,从而形成一个基于程序的作品,并根据上述第1节的条款复制和分发此类修改或作品。

我希望上面和上面的引用已经回答了这个问题。

1 个赞

如果我理解正确的话,这一切主要都与 JavaScript 相关。而且,它涉及到在你的浏览器中运行的 JavaScript,而这些 JavaScript 是由每个 Discourse 实例提供的。这主要也关乎“信任”以及了解正在运行的代码(能够查看它)的能力。对吗?

这超出了我的能力范围,但你能对此“控制”吗?除非你提交了一个会改变所有人东西的提交,否则我认为你无法真正“修复”任何东西,因为你所说的在你的电脑上运行的“软件”是每次都由服务器提供给你的浏览器的。

即使每个论坛都发布了自己的开源代码,并进行了所有可能的修改,你能确定他们一直都在运行这些代码吗?你不能一次性下载、检查并在你这边编译。

你真正想要的要么是:

  1. 没有 JavaScript(这对 Discourse 来说不太可能,因为它非常依赖 JavaScript)或者
  2. 一个安装在你电脑上的独立的开源客户端。后者也需要不使用 JavaScript,如果这一切对 Discourse 来说是可能的,我不知道。然后你就可以修改你的客户端并获得你想要的控制权。

这算是一个公平的理解吗?
(附注:这也超出了我的能力范围,但如果我没记错的话,并非 100% 的 Discourse 代码是开源的。现在,你只真正关心在你这边运行的东西,而不是所有服务器端的东西)

1 个赞

除了一些托管/基础设施代码外,我们所有的代码都是开源的。

2 个赞

@Jagster

Maybe I was being a bit overdramatic :slight_smile:

Because I get the vast majority of my software using apt install instead of a web browser, and I trust my software distribution (Trisquel) to only distribute free software, this isn’t usually a concern.

Just to be clear, I am not saying customizations are necessarily bad, just that they may be bad if they are nonfree, so a way to be sure you avoid running nonfree software is to disable customizations.

I think all software should be free/libre.

@Jagster @RGJ

To be clear, I am not trying to say Discourse is nonfree. It’s only this particular distribution of Discourse (Discourse Meta) that appears to include nonfree software.

@Jagster @merefield

I should have mentioned in my previous post that another reason I thought this distribution would be free is that the about page for Discourse says " There is only one version of Discourse – the awesome open source version.". This is, again, technically true because the plugins are not part of Discourse, but it felt misleading to me.

Discourse might not have control over third party distributions, but I would have expected Discourse instances hosted by Discourse to be free software if they are saying what they say on the about page. I might have also expected a license and/or framework that would effectively require derivatives to be free software, which there kind of is, since Discourse is GPL, but I guess it doesn’t cover plugins.

@merefield @NateDhaliwal

I think charging money for software or services is fine; usually the “free” in “free software” means “libre”, as in you are free to do what you want with it (copy, modify, etc.), after you get it. It does not necessarily mean that it is “free” as in “gratis” i.e. zero cost.

@NateDhaliwal

Strictly speaking, yes, there is no one stopping me, but it would be illegal, which seems bad. For private use this might work out, but generally public software repos and app stores don’t want to include code illegally, and some people who I might want to use the software may be uncomfortable running illegally copied code. I’m not sure I have the right approach; maybe I should just totally ignore copyright, but that seems like not the best option when it’s feasible to avoid illegal and nonfree software.

No worries! :slight_smile: I don’t think you’re being rude, and I don’t yet feel like we’re going in circles.

@RGJ

What do you mean by this? If the software is free that means I can modify it; therefore I do have control over what it does.

I don’t think free is the same as trusted; perhaps I should have said “arbitrary” instead of “untrusted”, but my point was that most browsers will execute whatever code a webpage gives them, and since I often visit websites I have never visited before, many websites I visit are “untrusted”. For these websites, I have no reason to think they will not send nonfree software.

Regarding NPM, I consider it more trusted than an arbitrary website, but maybe not as trusted as my apt or guix repos. Though, trust is not one-dimensional; although I would not trust a new package on NPM just because it is on NPM, I would trust that when I download JQuery from NPM it really is JQuery. NPM may make mistakes that allow an attacker to replace JQuery, but NPM could take measures to avoid malware that would not be as realistic for site-served JavaScript (e.g. pre-publish automated/manual review, post-publish crowd-sourced review, automated checking that minified/obfuscated scripts match source code, rules against downloading and running arbitrary code at runtime). Importantly, when malware is found on NPM, there’s a third party (NPM, as opposed to the software developer) to report it to so it can be removed. This is not the case for site-served JavaScript - the only one who can remove it is the site operator.

Does that mean the listed commit hash would be incorrect if a server administrator made modifications and didn’t also change the listed commit hash? I thought updating software would change the commit hash automatically, and I (incorrectly?) assumed the listed commit hash would be updated automatically.

Would plugin-injected JavaScript be disabled with safe_mode=no_themes,no_unofficial_plugins?

So, would the only way to avoid nonfree software while using Discourse be to package a Discourse client as a browser extension or Haketilo package or something similar?

I’m not sure what you mean by that considering my original question is about software freedom, and not trust.

I disagree that everyone you listed has to be trusted.

  • The server administrators would not have to be trusted if you don’t run software served by them, for example if you get the Discourse client from GitHub and package it so it can be used with that server.
  • In many cases, people collaborating on software might read some of each others’ commits, so I don’t have to trust all authors individually.

So that would mean the Discourse Meta client is proprietary software, right? Though, it is possible to use safe mode to disable the plugin JS.

Maybe, but that’s not very helpful if I want to avoid nonfree software.

@NateDhaliwal
I have read the license in the Discourse git repo, but (because of the CLA) it does not necessarily apply to derivatives of Discourse outside of that repo. I would like to see a notice on every Discourse distribution that says which of the distributed software is libre. It would even (IMO) fit with the spirit of the GPL: “you must show them these terms so they know their rights”.

@Mevo

Yes, it is possible, to run JavaScript from a browser extension or proxy, such a Haketilo or GreaseMonkey, though this can be very impractical for some software, for example if it updates very often, as would be the case for software where data is baked into the JavaScript software. Haketilo also doesn’t have support for some kinds of scripts, for example scripts with a type of “module”.

Yes, I think your understanding is correct overall. Though packaging the JavaScript as a browser extension or for Haketilo or GreaseMonkey would effectively result in an independent installed client, even though it would be using JavaScript.

@HAWK

I’m guessing you mean “Everything” as in “everything that’s part of Discourse”, as in, not including plugins like discourse-customer-flair-plugin?

我们托管的核心产品(包括 Meta)的所有部分,除了我上面提到的例外,都是免费且开源的。

一些插件依赖于专有平台运行,但这与 Discourse 是否开源无关。

5 个赞

由 CDCK 或我们(我是一家托管 Discourse 的公司的联合创始人)托管的所有 Discourse 实例都在运行一个或几个闭源插件,以提供特定于托管环境的功能。

我认为在传统意义上的发行版(这里有一个 github 仓库,你可以随意做任何你想做的事情)和现代意义上的发行版(这是一个网站,它向你的浏览器推送 Javascript)之间存在很多混淆。此外,在 Discourse https://github.com/discourse/discourse 和 Discourse 及其所有由站点管理员添加的第一个和第三方插件及主题组件之间也存在混淆。

这是一个提交哈希,所以如果在从仓库拉取后、提交前进行了修改,那么你已经遇到了这种情况。这不一定是一个恶意行为,当应用安全补丁时也会发生(这通常在提交到公共分支之前完成)。现在,一般来说,安全补丁不是客户端的,但它们可能会引入一些更新的客户端代码。

是的——至少理论上是这样。我不确定规避它的难度有多大(无论是故意还是意外)。

:thinking: Was the iOS SSL Flaw Deliberate? - Schneier on Security

这是一种方法,我不确定是否是唯一的方法。如果你这样做,你需要几乎每天更新它,以避免出现问题。

尽管整个话题是一个有趣的法律讨论,但这一切似乎都与现实有些脱节。

3 个赞

@HAWK

是否有单独的存储库,其中包含我之前未找到的插件(例如 discourse-customer-flair-plugin)的许可证?提供给浏览器的 JavaScript 包含指向源映射的链接,但据我所知没有许可证。

我理解的“托管/基础设施代码”不包括客户端 JavaScript;这是正确的吗?

@RGJ

我同意。我认为我对“Discourse”一词的实际含义感到困惑。

啊,好吧,所以我想没有真正的好方法来判断。

说得有理,有人可能会试图隐藏这样的漏洞。但通过审计第三方代码来缓解这个问题似乎比信任每一个修改过上游代码的人更容易,尽管这两种方法可能都无法完全做到。

是的,尽管有可能大多数更新可以自动处理。

我想在大多数情况下这是正确的。

1 个赞

Just FYI, @JacobK1 : Discourse being well done, there is no need to tag someone when you quote that person. The quote itself will already generate a notification :+1: (it was also to create subsections, admittedly :pray: )

2 个赞