Commit Graph

39561 Commits

Author SHA1 Message Date
49bd066037 FEATURE: Default allow embed secure images in email to true (#10688)
We are making the changes from the PR #10563 the default behaviour. Now, if secure media is enabled, secure images will be embedded in emails by default instead of redacting them and displaying a message. This will be a nicer overall experience by default, and for forums that want to be super strict with redaction this setting can always be disabled.
2020-09-17 14:15:02 +10:00
80268357e7 DEV: Change upload verified column to be integer (#10643)
Per review https://review.discourse.org/t/dev-add-verified-to-uploads-and-fill-in-s3-inventory-10406/14180

Change the verified column for Upload to a verified_status integer column, to avoid having NULL as a weird implicit status.
2020-09-17 13:35:29 +10:00
e313aa5a6e Build(deps): Bump rack-mini-profiler from 2.0.4 to 2.1.0
Bumps [rack-mini-profiler](https://github.com/MiniProfiler/rack-mini-profiler) from 2.0.4 to 2.1.0.
- [Release notes](https://github.com/MiniProfiler/rack-mini-profiler/releases)
- [Changelog](https://github.com/MiniProfiler/rack-mini-profiler/blob/master/CHANGELOG.md)
- [Commits](https://github.com/MiniProfiler/rack-mini-profiler/compare/v2.0.4...v2.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-17 08:53:27 +08:00
19b9a1159c Build(deps-dev): Bump parallel_tests from 3.2.0 to 3.3.0 (#10684)
Bumps [parallel_tests](https://github.com/grosser/parallel_tests) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/grosser/parallel_tests/releases)
- [Changelog](https://github.com/grosser/parallel_tests/blob/master/CHANGELOG.md)
- [Commits](https://github.com/grosser/parallel_tests/compare/v3.2.0...v3.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-16 16:55:22 -04:00
bc2b9f4ea2 Build(deps): Bump rubocop-ast from 0.4.0 to 0.4.1 (#10683)
Bumps [rubocop-ast](https://github.com/rubocop-hq/rubocop-ast) from 0.4.0 to 0.4.1.
- [Release notes](https://github.com/rubocop-hq/rubocop-ast/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop-ast/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop-ast/compare/v0.4.0...v0.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-16 16:41:22 -04:00
b207842720 FIX: group tag notifications included for all users
Regression from my last commit
2020-09-16 16:02:28 -04:00
04be39ed46 FIX: don't show Tags tab in group management if tags are disabled 2020-09-16 15:43:11 -04:00
8333872e88 FIX: N+1 for admins viewing groups page
Groups page was loading fields that are only used on the group show
page, so move those fields to the GroupShowSerializer.
Also only fetch the default category and tag notifications once.
2020-09-16 14:58:52 -04:00
28cd1aaf8e FIX: uses get() on properties of groups/badges which could be POJOs (#10682) 2020-09-16 16:45:11 +02:00
02dec8c209 UI: minor size/spacing inconsistencies in search advanced options (#10681) 2020-09-16 15:05:19 +02:00
6734a82260 Update translations 2020-09-16 10:17:56 +00:00
4af48f7998 FIX: attempts to make autofocus more resilient in modals (#10680)
The current situation could cause a transition on the button to end after/during modal has shown and causing the button to get focus again. Browsers would then refuse to switch focus.

This is a kinda convulted solution, but it's a general purpose solution which doesn't involve changing anything in plugins/themes or core templates.
2020-09-16 11:05:02 +02:00
32d6286bea FIX: category slug route was not working for subfolder setup
https://meta.discourse.org/t/relative-url-root-issues-incorrect-latest-link-incorrect-redirect/163266

URLs like `/forum/c/staff` (subfolder setup) were landing on
`/forum/forum/c/staff/3`. Note the extra "/forum". This commit
strips the redundant subfolder path from category URL.
2020-09-16 12:09:16 +05:30
ddcf0d7d01 Update rails_failover to 0.5.7. 2020-09-16 13:53:45 +08:00
44aac1b44b Update translations 2020-09-16 04:27:51 +00:00
57e88ebc61 Build(deps-dev): Bump better_errors from 2.7.1 to 2.8.0
Bumps [better_errors](https://github.com/BetterErrors/better_errors) from 2.7.1 to 2.8.0.
- [Release notes](https://github.com/BetterErrors/better_errors/releases)
- [Commits](https://github.com/BetterErrors/better_errors/compare/v2.7.1...v2.8.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-16 09:53:49 +08:00
38c5d26b04 Build(deps): Bump nio4r from 2.5.3 to 2.5.4
Bumps [nio4r](https://github.com/socketry/nio4r) from 2.5.3 to 2.5.4.
- [Release notes](https://github.com/socketry/nio4r/releases)
- [Changelog](https://github.com/socketry/nio4r/blob/master/CHANGES.md)
- [Commits](https://github.com/socketry/nio4r/compare/v2.5.3...v2.5.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-16 09:53:37 +08:00
9ed42956f1 Build(deps): Bump onebox from 2.1.2 to 2.1.3 (#10677)
Bumps [onebox](https://github.com/discourse/onebox) from 2.1.2 to 2.1.3.
- [Release notes](https://github.com/discourse/onebox/releases)
- [Changelog](https://github.com/discourse/onebox/blob/master/CHANGELOG.md)
- [Commits](https://github.com/discourse/onebox/compare/v2.1.2...v2.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-16 06:54:06 +05:30
6610576deb FIX: Clear stylesheet cache on base font change
Previously, we were not clearing the cache on themes using the default
color scheme.
2020-09-15 13:13:09 -04:00
19b24e178c SECURITY: __ws shouldn't be able to override every domain in multisite 2020-09-15 17:35:57 +01:00
b3514ce1a3 Build(deps): Bump rubocop from 0.90.0 to 0.91.0 (#10673)
Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.90.0 to 0.91.0.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.90.0...v0.91.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-15 11:05:37 -04:00
7fed4a4d4f Build(deps): Bump rails_multisite from 2.3.0 to 2.4.0 (#10672)
Bumps [rails_multisite]() from 2.3.0 to 2.4.0.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-15 11:03:57 -04:00
e7abba9bbe FIX: Missing files from previous commit 2020-09-15 10:59:41 -04:00
8c384ae6b8 Create proper shim for xss library - second attempt 2020-09-15 10:42:51 -04:00
273db57d6e FEATURE: Allow admins to delete user SSO records in the UI (#10669)
Also displays the user's last payload in the admin UI to help with debugging SSO issues.
2020-09-15 10:00:10 -04:00
6d7b8a71c0 FIX: topic progress wrapper positioning regression
Followup to 94ed54a616302675e3dc5b3ea7fa6e0a7c23ef84
2020-09-15 09:38:06 -04:00
02e6f4c5d4 UX: Remove extraneous ellipsis after "loading"
The "loading" string already contains an ellipsis: 5990c71c29/config/locales/client.en.yml (L1480)
2020-09-15 15:22:46 +02:00
5990c71c29 Update translations 2020-09-15 13:04:17 +00:00
15b3477145 FIX: img width and height should be in quotes (#10675) 2020-09-15 11:39:12 +02:00
53e281a3fd FIX: simplifies updating searchedTerms from connectors (#10674) 2020-09-15 11:21:38 +02:00
324aa3eb61 REFACTOR: reworks all the search-advanced-options panel (#10661)
* REFACTOR: reworks all the search-advanced-options panel

This commit includes the following changes:
- prevents any mutation of external (to the component) values
- get rid of observers
- uses @action
- minor UI tweaks
- dropped the unecessary debounce
- drops all the legacy code for badges/groups which is not being used
- replaces user-selector by user-chooser and improves multi-select to not show `search` if maximum has been reached

Most importantly this refactor should fix multiple bugs due to _update() being called multiple times if searchTerm was empty and other various bugs where some changes in searchTerm was not applied to the sidebar.
2020-09-15 09:39:12 +02:00
bbddce4d3a DEV: updates js transpiler to use babel 7 (#10627)
Updates our js transpiler code to use Babel 7.11.6

List of changes in this commit:

- Updates plugins, babel plugins all have a new version which doesn't contain -es2015- anymore
- Drops [transform-es2015-classes](https://babeljs.io/docs/en/babel-plugin-transform-classes) this plugin shouldn't be needed now that we don't support IE
- Drops check-es2015-constants, checking constants is now part of babel and the check-constants plugin is deprecated. As a result the behavior slightly changed, and is now wrapping every const call in a readOnlyError function which would throw if assigned a new value. This explains the modified spec.
- Adds [proposal-optional-chaining](https://babeljs.io/docs/en/babel-plugin-proposal-optional-chaining)

```javascript
const obj = {
  foo: {
    bar: {
      baz: 42,
    },
  },
};

const baz = obj?.foo?.bar?.baz; // 42
```

- Adds [proposal-json-strings](https://babeljs.io/docs/en/babel-plugin-proposal-json-strings)

```javascript
// IN
const ex = "before
after";
//                ^ There's a U+2028 char between 'before' and 'after'


// OUT
const ex = "before\u2028after";
//                ^ There's a U+2028 char between 'before' and 'after'
```

- Adds [proposal-nullish-coalescing-operator](https://babeljs.io/docs/en/babel-plugin-proposal-nullish-coalescing-operator)

```javascript
var object = {};
var foo = object.foo ?? "default"; // default
```

- Adds [proposal-logical-assignment-operators](https://babeljs.io/docs/en/babel-plugin-proposal-logical-assignment-operators)

```javascript
let a;
let b = 2;
a ||= b; // 2
```

- Adds [proposal-numeric-separator](https://babeljs.io/docs/en/babel-plugin-proposal-numeric-separator)

```javascript
let budget = 1_000_000_000_000;
console.log(budget === 10 ** 12); // true
```

- Adds proposal-object-rest-spread https://babeljs.io/docs/en/babel-plugin-proposal-object-rest-spread

```javascript
let { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 };
console.log(x); // 1
console.log(y); // 2
console.log(z); // { a: 3, b: 4 }
```

- Adds proposal-optional-catch-binding https://babeljs.io/docs/en/babel-plugin-proposal-optional-catch-binding

```javascript
try {

} catch {

} finally {
  // ensures finally is available in every browsers
}
```

- Adds improved regex support for firefox through (transform-dotall-regex](https://babeljs.io/docs/en/next/babel-plugin-transform-dotall-regex.html) and (proposal-unicode-property-regex](https://babeljs.io/docs/en/babel-plugin-proposal-unicode-property-regex)

- Drops async/generator stuff, the browser we target should allow to use this (excepts iterable async)
2020-09-15 09:26:33 +02:00
49f53bdc50 DEV: Fix another MessageBus::InvalidMessageTarget error.
Follow-up to c2f2b57a9bbd9fdef74d1bde7a71de1abbcc08c5.
2020-09-15 14:25:10 +08:00
f7438fc64b DEV: Fix MessageBus::InvalidMessageTarget error after upgrading mb.
Follow-up to c2f2b57a9bbd9fdef74d1bde7a71de1abbcc08c5
2020-09-15 14:15:42 +08:00
c2f2b57a9b Update message_bus to 3.3.2. 2020-09-15 13:33:11 +08:00
2ff16b3650 FIX: TopicQuery.list_private_messages_unread ignore notification level 2020-09-15 13:33:11 +08:00
d83e3f9ce8 FIX: improvements after code review 2020-09-15 13:29:35 +08:00
145814d29c FIX: spec for oversized images security fix
Spec to cover solution presented here - 333ddd4011
2020-09-15 13:29:35 +08:00
e3b4632f04 Revert "Create proper shim for xss library"
This reverts commit 30e91125356e3e034bd804d4725065e327280ad4.
2020-09-15 11:38:40 +08:00
b2f556232f REFACTOR: improve readability of cacheBuster 2020-09-14 16:46:17 -04:00
30e9112535 Create proper shim for xss library 2020-09-14 15:57:32 -04:00
7699b90f1a FIX: Wizard does not include discourse-shims
This allowed tests to pass even when wizard was broken, which is
obviously very bad.
2020-09-14 12:34:16 -04:00
9238a9e427 FIX: adds shims for popper in wizard (#10658) 2020-09-14 12:33:14 -04:00
663d696095 Build(deps-dev): Bump webmock from 3.9.0 to 3.9.1 (#10667)
Bumps [webmock](https://github.com/bblimke/webmock) from 3.9.0 to 3.9.1.
- [Release notes](https://github.com/bblimke/webmock/releases)
- [Changelog](https://github.com/bblimke/webmock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bblimke/webmock/compare/v3.9.0...v3.9.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-14 11:25:06 -04:00
06b4ca5dc7 FIX: Mark only uploads as verified/unverified in S3 inventory 2020-09-14 10:21:34 -04:00
66eda8c9df DEV: Add include_pms option to TopicQuery (#10647)
This is intended for use by plugins which are building their own topic lists, and want to include PMs alongside regular topics (e.g. discourse-assign). It does not get used directly in core.
2020-09-14 12:07:35 +01:00
21adc07057 FIX: upload errors were sometimes not displayed properly (#10605) 2020-09-14 00:13:38 -07:00
e169e5a32f Build(deps): Bump sprockets-rails from 3.2.1 to 3.2.2
Bumps [sprockets-rails](https://github.com/rails/sprockets-rails) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/rails/sprockets-rails/releases)
- [Commits](https://github.com/rails/sprockets-rails/compare/v3.2.1...v3.2.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-14 14:35:03 +08:00
11a15cb28e Build(deps): Bump rails_failover from 0.5.5 to 0.5.6
Bumps rails_failover from 0.5.5 to 0.5.6.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-14 14:34:43 +08:00
e02da64091 FIX: Make form use /u/admin-login instead of /users/admin-login (#10663) 2020-09-14 12:27:06 +10:00