56431 Commits

Author SHA1 Message Date
Roman Rizzi
fa235e49e9
Bump version to v3.3.4 2025-02-04 13:43:01 -03:00
David Taylor
d47964d992
SECURITY: Ensure user-stream topic titles are always escaped correctly
In core, `escapeExpression` was being applied during the model loading phase. However, plugin consumers of the UserStreamItem component were not necessarily doing the same.

This commit moves the emoji-replacement logic (which also safely handles escaping) into the component template, so that it is safe-by-default, regardless of how it's used by plugins.
2025-02-04 13:35:17 -03:00
OsamaSayegh
ca1ff4dfbc
SECURITY: Limit /inline-onebox to 10 URLs at a time 2025-02-04 13:35:13 -03:00
Gary
549cabd140
Don't allow loading tagged PMs in another user's inbox. 2025-02-04 13:35:09 -03:00
David Battersby
fa0748428d
SECURITY: Ability to bypass disabling chat of users 2025-02-04 13:35:06 -03:00
Blake Erickson
2ddb27cf9c
SECURITY: Restrict allowed URL patterns
Restrict allowed URL patterns for oneboxes.
2025-02-04 13:35:02 -03:00
Alan Guo Xiang Tan
5d60557e0f
SECURITY: Preload data only when rendering application layout
This commit drops the `before_action :preload_json` callback in `ApplicationController` as it adds unnecessary complexity to `ApplicationController` as well as other controllers which has to skip this callback. The source of the complexity comes mainly from the following two conditionals in the `preload_json` method:

```
    # We don't preload JSON on xhr or JSON request
    return if request.xhr? || request.format.json?

    # if we are posting in makes no sense to preload
    return if request.method != "GET"
```

Basically, the conditionals solely exists for optimization purposes to ensure that we don't run the preloading code when the request is not a GET request and the response is not expected to be HTML. The key problem here is that the conditionals are trying to expect what the content type of the response will be and this has proven to be hard to get right. Instead, we can simplify this problem by running the preloading code in a more deterministic way which is to preload only when the `application` layout is being rendered and this is main change that this commit introduces.
2025-02-04 13:34:58 -03:00
Blake Erickson
8192aedd69
SECURITY: Sanitize video placeholder urls
Make sure video placeholder urls are valid. An error message is displayed instead of an infinite loading spinner after clicking play.
2025-02-04 13:34:54 -03:00
Discourse Translator Bot
2c5dbdc23f
Update translations (#31124) 2025-02-04 15:17:59 +01:00
Discourse Translator Bot
6405b2823b
Update translations (#31036) 2025-01-31 10:48:49 +01:00
Jeff Wong
5d4c2a89e1
FIX: enforce second factor with subfolders (#30993)
fix an improper redirect when enforcing second factor under a subfolder
install

backport of #30992
2025-01-24 11:51:12 -08:00
Discourse Translator Bot
ac9a4e690e
Update translations (#30899) 2025-01-21 15:55:34 +01:00
Discourse Translator Bot
cecd9d48b6
Update translations (#30766) 2025-01-14 16:19:54 +01:00
Discourse Translator Bot
17a49d7562 Update translations 2025-01-07 21:56:49 +01:00
Discourse Translator Bot
bc19915944
Update translations (#30435) 2025-01-03 14:01:37 +01:00
Penar Musaraj
bb7b5ec70c
FIX: Simplify nginx config change (#30383) (#30410) 2024-12-22 16:12:22 -05:00
=
7066b89b18 Bump version to v3.3.3 2024-12-19 13:24:40 -03:00
Blake Erickson
a7b4dc7026 SECURITY: When enabled only allow Discourse Connect logins
If Discourse Connect is enabled no other methods for account creation or
authentication should be allowed.
2024-12-19 13:14:26 -03:00
Nat
438abaa504 SECURITY: Scrub headers to prevent access to files via nginx 2024-12-19 13:14:23 -03:00
David Battersby
7324bc35a2 SECURITY: Stored xss in image caption 2024-12-19 13:14:20 -03:00
Krzysztof Kotlarek
f5221e0aec SECURITY: Moderators cannot see user emails.
Unless `moderators_view_emails` SiteSetting is enabled, moderators should not be able to discover users’ emails.
2024-12-19 13:14:18 -03:00
Discourse Translator Bot
370e6d37ba
Update translations (#30320) 2024-12-18 15:19:43 +01:00
Discourse Translator Bot
85a89e0e22
Update translations (#30203) 2024-12-10 20:16:39 +01:00
Discourse Translator Bot
84fa512335
Update translations (#30149) 2024-12-06 18:04:58 +01:00
Amanda Alves Branquinho
f71e1643db
DEV: backport outlet wrappers (#30110)
* DEV: add outlet wrapper for categories boxes (#28860)

* DEV: add outlet wrapper for category boxes

* Put plugin outlet after categories boxes

* DEV: Add outlet wrapper for badges template (#28928)

* DEV: Add outlet wrapper for badges template

* Apply suggestions from code review

Co-authored-by: Sérgio Saquetim <1108771+megothss@users.noreply.github.com>

---------

Co-authored-by: Sérgio Saquetim <1108771+megothss@users.noreply.github.com>

* DEV: Add aditional args to plugin outlet (#28948)

* DEV: Add outlet wrapper for user card information replacement (#29523)

* DEV: Add outlet wrapper for user card information replacement

* Fix format issues

* Fix format issues

* format file

* DEV: add outlet wrapper for small user list (#29763)

* DEV: add outlet wrapper for small user list

* DEV: use value transformer to extend small user attrs function

* Update app/assets/javascripts/discourse/app/components/small-user-list.gjs

Co-authored-by: Jarek Radosz <jradosz@gmail.com>

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>

* Fix lint issue

* remove extra html

* remove extra value transformers

* disable template formatting rule

* remove aria hidden

---------

Co-authored-by: Sérgio Saquetim <1108771+megothss@users.noreply.github.com>
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-12-05 21:26:05 -03:00
Amanda Alves Branquinho
8a1c84b748
DEV: Backport alias outlet user actions to stable branch (#30091)
* DEV:Add plugin outlet for liked posts (#29899)

* DEV:Add plugin outlet for liked posts

* sort imports

* Dev/add outlet for participant (#29864)

* DEV: add outlet for topic participant

* format topic participant file

* Update app/assets/javascripts/discourse/app/components/topic-map/topic-participant.gjs

Co-authored-by: Jarek Radosz <jradosz@gmail.com>

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>

* DEV:refactor user badges create to get grant opts from method (#29372)

* DEV:refactor user badges create to get grant opts from method

* Replace method overwrite with plugin modifier

* Add aditional params

* change modifier name

* DEV: Add outlet wrapper for user badges form (#29333)

* DEV: Add outlet wrapper for user badges form

* Add outlet for badge granter table

* add extra args to outlet

* DEV: Add helpers to customize poster title (#29156)

* DEV: Add helpers to customize poster title

* fix formatting issues

* Update app/assets/javascripts/discourse/app/templates/badges/show.hbs

Co-authored-by: Jarek Radosz <jradosz@gmail.com>

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>

* DEV: add outlet wrapper for category name field (#28858)

* DEV: Add outlet wrapper to categories only component (#28669)

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-12-04 22:54:20 -03:00
David Taylor
894c497bed
DEV: Skip encrypt on stable CI (#30108)
Encrypt's tests are known to be flaky, and now seem to be impacting the poll plugin specs somehow. The plugin is end-of-life, with almost no users, so let's skip it on stable CI.
2024-12-04 18:32:02 +00:00
Discourse Translator Bot
9c7dd23597
Update translations (#30063) 2024-12-04 11:59:32 +01:00
Discourse Translator Bot
f5b108bf92
Update translations (#29935) 2024-11-26 23:15:01 +01:00
Discourse Translator Bot
1c5bbc7d45
Update translations (#29836)
Some checks failed
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (annotations, core) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, core) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, plugins) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, plugins) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, themes) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, chat) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, core) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, plugins) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, themes) (push) Has been cancelled
Tests / core frontend (${{ matrix.browser }}) (Chrome) (push) Has been cancelled
Tests / core frontend (${{ matrix.browser }}) (Firefox ESR) (push) Has been cancelled
Tests / core frontend (${{ matrix.browser }}) (Firefox Evergreen) (push) Has been cancelled
2024-11-20 00:21:29 +01:00
Roman Rizzi
d51a9373b4
FIX: Ensure normalized_email gets anonymized (#29720) 2024-11-12 15:41:11 -03:00
Discourse Translator Bot
0394df524a
Update translations (#29716) 2024-11-12 14:54:43 +01:00
Discourse Translator Bot
6cd6ed5b82
Update translations (#29596)
Some checks failed
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (annotations, core) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, core) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, plugins) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, plugins) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, themes) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, chat) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, core) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, plugins) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, themes) (push) Has been cancelled
Tests / core frontend (${{ matrix.browser }}) (Chrome) (push) Has been cancelled
Tests / core frontend (${{ matrix.browser }}) (Firefox ESR) (push) Has been cancelled
Tests / core frontend (${{ matrix.browser }}) (Firefox Evergreen) (push) Has been cancelled
2024-11-05 16:55:50 +01:00
Discourse Translator Bot
1da4243cca
Update translations (#29469)
Some checks failed
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (annotations, core) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, core) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (backend, plugins) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, plugins) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (frontend, themes) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, chat) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, core) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, plugins) (push) Has been cancelled
Tests / ${{ matrix.target }} ${{ matrix.build_type }} (system, themes) (push) Has been cancelled
Tests / core frontend (${{ matrix.browser }}) (Chrome) (push) Has been cancelled
Tests / core frontend (${{ matrix.browser }}) (Firefox ESR) (push) Has been cancelled
Tests / core frontend (${{ matrix.browser }}) (Firefox Evergreen) (push) Has been cancelled
2024-10-29 15:31:46 +01:00
Discourse Translator Bot
9009ad78ad
Update translations (#29336) 2024-10-22 22:44:37 +09:00
Discourse Translator Bot
fbe1719484
Update translations (#29213) 2024-10-16 17:52:06 +09:00
Alan Guo Xiang Tan
e0a734044a
DEV: Start running discourse-ai tests for stable again. (#29206)
I think the tests works with the new base image now. Will revert if it
doesn't.
2024-10-16 06:51:19 +08:00
Loïc Guitaut
a0a7b439e1 DEV: Output failing MF keys when compilation fails
Currently, when the MessageFormat compiler fails on some translations,
we just have the raw output from the compiler in the logs and that’s not
always very helpful.

Now, when there is an error, we iterate over the translation keys and
try to compile them one by one. When we detect one that is failing, it’s
added to a list that is now outputted in the logs. That way, it’s easier
to know which keys are not properly translated, and the problems can be
addressed quicker.

---

The previous implementation of this patch had a bug: it wasn’t handling
locales with country/region code properly. So instead of iterating over
the problematic keys, it was raising an error.
2024-10-15 12:45:27 +02:00
Jeff Wong
745bc9ffa3
Revert "DEV: Output failing MF keys when compilation fails" (#29199)
This reverts commit aedfb12eda0fb4aed3fb9cd282b46740c15a1dbb.
2024-10-14 17:37:44 -07:00
Discourse Translator Bot
28141388fb
Update translations (#29124) 2024-10-08 20:21:48 +02:00
dependabot[bot]
e32878c822 Build(deps-dev): Bump selenium-devtools from 0.128.0 to 0.129.0 (#28988)
Bumps [selenium-devtools](https://github.com/SeleniumHQ/selenium) from 0.128.0 to 0.129.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)
- [Commits](https://github.com/SeleniumHQ/selenium/commits)

---
updated-dependencies:
- dependency-name: selenium-devtools
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-07 12:22:11 +08:00
dependabot[bot]
07e880f3d2 Build(deps-dev): Bump selenium-devtools from 0.127.0 to 0.128.0 (#28622)
Bumps [selenium-devtools](https://github.com/SeleniumHQ/selenium) from 0.127.0 to 0.128.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)
- [Commits](https://github.com/SeleniumHQ/selenium/commits)

---
updated-dependencies:
- dependency-name: selenium-devtools
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-07 12:22:11 +08:00
dependabot[bot]
7ba5599033 Build(deps-dev): Bump selenium-devtools from 0.126.0 to 0.127.0 (#28309)
Bumps [selenium-devtools](https://github.com/SeleniumHQ/selenium) from 0.126.0 to 0.127.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)
- [Commits](https://github.com/SeleniumHQ/selenium/commits)

---
updated-dependencies:
- dependency-name: selenium-devtools
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-07 12:22:11 +08:00
Alan Guo Xiang Tan
c5f9a300d8
Bump version to v3.3.2 v3.3.2 2024-10-07 12:16:40 +08:00
Penar Musaraj
250625774e
SECURITY: prevent topic list filtering by hidden tags for unathorized users
This fixes an issue where unathorized users were able to filter topics
by tags that are hidden from them.
2024-10-07 11:50:07 +08:00
OsamaSayegh
f08cd7f701
SECURITY: Block registrations for encoded emails that are invalid 2024-10-07 11:50:04 +08:00
Jan Cernik
cd9d0d7c17
SECURITY: add pagination to post replies
When a post has some replies, and the user click on the button to show them, we would load ALL the replies. This could lead to DoS if there were a very large number of replies.

This adds support for pagination to these post replies.

Internal ref t/129773
2024-10-07 11:50:00 +08:00
Bianca Nenciu
e9e9ae37a9
SECURITY: Use different anon cache keys for XHR requests
XHR requests are handled differently by the application and the
responses do not have any preloaded data so the cache key needs to
differntiate between those requests.
2024-10-07 11:49:57 +08:00
Jan Cernik
77a2d82d5a
SECURITY: Correctly parse URLs in chat excerpts 2024-10-07 11:49:54 +08:00
Loïc Guitaut
aedfb12eda DEV: Output failing MF keys when compilation fails
Currently, when the MessageFormat compiler fails on some translations,
we just have the raw output from the compiler in the logs and that’s not
always very helpful.

Now, when there is an error, we iterate over the translation keys and
try to compile them one by one. When we detect one that is failing, it’s
added to a list that is now outputted in the logs. That way, it’s easier
to know which keys are not properly translated, and the problems can be
addressed quicker.
2024-10-04 23:51:08 +09:00