Commit Graph

56419 Commits

Author SHA1 Message Date
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 aedfb12eda.
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 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
Discourse Translator Bot
7bf7bc2b8c Update translations 2024-10-02 08:55:14 +02:00
Ted Johansson
25514419e0
FIX: Fix incorrect check for required custom fields (#28541) (#28939)
This check was checking the wrong scope, causing problems in certain edge conditions, for example:

1. Admin adds an "on signup" field that isn't editable after signup.
2. Admin adds a "for all users" field.
3. User goes and fills up the "for all users" field from 2.
4. User is now stuck on the required fields page without any fields showing.

With this change, we only consider "for all users" fields when asking if required custom fields are filled in.
2024-09-17 13:32:26 +08:00
Alan Guo Xiang Tan
a21c68b7f3
DEV: Cap number of thread-loader workers in assets:precompile:build (#28830) (#28836)
We were running into errors running `ember build` on machines with high
CPU counts. It was then noted that `thread-loader`, which embroider uses, defaults to spinning
up x workers where x is number of physical CPU cores - 1. That is
probably too much so we set out to find out an optimial count to set for
the `JOBS` env which embroider will use to set the number of
`thread-loader` workers.

I first built an image using the following Dockerfile.

```
FROM discourse/base:release

RUN cd /var/www/discourse && sudo -EH -u discourse bundle exec rake plugin:install_all_official
RUN cd /var/www/discourse && sudo -EH -u discourse bundle exec rake assets:precompile:prereqs
```

I then ran the following command on my M3 Max Macbook Pro that has 14
phyisal CPU cores.

```
for j in 1 2 4 8 14; do echo "JOBS=$j"; time docker run --rm -it -e JOBS=$j test:latest /bin/bash -c "su discourse -c 'cd /var/www/discourse && bundle exec rake assets:precompile:build'"; done
```

These are the results I got:

```
JOBS=1 0.04s user 0.03s system 0% cpu 1:01.92 total
JOBS=2 0.04s user 0.02s system 0% cpu 42.605 total
JOBS=4 0.04s user 0.02s system 0% cpu 37.012 total
JOBS=8 0.04s user 0.02s system 0% cpu 35.199 total
JOBs=14 0.04s user 0.02s system 0% cpu 37.941 total
```

We think JOBS=2 is a good default when the `JOBS` env has not been set.
Anything above just consumes more resources for little benefit.
2024-09-11 09:04:04 +08:00
Discourse Translator Bot
381cf85481
Update translations (#28706) 2024-09-05 16:00:39 +02:00
Discourse Translator Bot
6e82e844a1
Update translations (#28578) 2024-09-02 18:00:09 +02:00
Bianca Nenciu
15f036bafa
DEV: Migrate notifications#id and related columns to bigint (#28584)
* DEV: Migrate notifications#id to bigint (#28444)

The `notifications.id` column is the most probable column to run out of
values. This is because it is an `int` column that has only 2147483647
values and many notifications are generated on a regular basis in an
active community. This commit migrates the column to `bigint`.

These migrations do not use `ALTER TABLE ... COLUMN ... TYPE` in order
to avoid the `ACCESS EXCLUSIVE` lock on the entire table. Instead, they
create a new `bigint` column, copy the values to the new column and
then sets the new column as primary key.

Related columns (see `user_badges`, `shelved_notifications`) will
be migrated in a follow-up commit.

* DEV: Fix bigint notifications id migration to deal with public schema (#28538)

Follow up to 799a45a291

* DEV: Migrate shelved_notifications#notification_id to bigint (#28549)

DEV: Migrate shelved_notifications#notification_id to bigint

The `notifications.id` has been migrated to `bigint` in previous commit
799a45a291.

* DEV: Fix annotations (#28569)

Follow-up to ec8ba5a0b9

* DEV: Migrate user_badges#notification_id to bigint (#28546)

The `notifications.id` has been migrated to bigint in previous commit
799a45a291. This commit migrates one of
the related columns, `user_badges.notification_id`, to `bigint`.

* DEV: Migrate `User#seen_notification_id` to `bigint` (#28572)

`Notification#id` was migrated to `bigint` in 799a45a291

* DEV: Migrate `Chat::NotificationMention#notification_id` to `bigint` (#28571)

`Notification#id` was migrated to `bigint` in 799a45a291

---------

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2024-08-29 18:06:55 +03:00
Penar Musaraj
c4ece1a7b7
Bump version to v3.3.1 2024-08-27 10:58:34 -04:00
Joffrey JAFFEUX
d3ad2ecda9
FIX: Badge image uploader (#28188) (#28521)
In the formkit conversion in 2ca06ba236
we missed setting a type for the UppyImageUploader for badges. Also,
we were not passing down the `image_url` as form data, so when we used
`data.image` for that field the badge was not updating in the UI after
page loads and the image URL was not loading for preview.

Co-authored-by: Martin Brennan <martin@discourse.org>
2024-08-23 18:08:32 +02:00
Discourse Translator Bot
ea7d25338f
Update translations (#28439) 2024-08-20 17:59:52 +02:00
Ted Johansson
eaa40bb179
DEV: Allow disabling problem checks programatically (#28440) (#28441)
We need a way to disable certain checks programatically, e.g. on Discourse hosting. This PR adds a configuration option for this, and makes it so that disabled checks aren't run as part of #run_all.
2024-08-20 17:14:46 +02:00
Alan Guo Xiang Tan
6cc856c1df
DEV: Switch back to Chrome for running QUnit tests (#28430)
QUnit tests are failing in different ways on Chromium in Debian
bookworm. We have no interest in figuring out why as it is not a good
use of our time and the long term plan is to switch to Chrome for Testing
anyway.
2024-08-20 13:09:00 +08:00
Alan Guo Xiang Tan
9e7be60847
DEV: Update mini_racer (#28363) (#28428)
This pulls in 87ef545a27
2024-08-20 09:07:19 +08:00