Commit graph

4504 commits

Author SHA1 Message Date
Andrew Kvalheim
80d7ac545c Set nofollow on links in Markdown content
To disincentivize spamdexing, links in user-generated content should be
disavowed by annotation with `rel="nofollow"` attributes:

  - https://en.wikipedia.org/wiki/Nofollow

Automated spam has already targeted OSEM in the wild:

  - https://github.com/SeaGL/organization/issues/274

Ideally link annotation would be performed during Markdown rendering or
a single sanitization pass, but this is currently an unresolved issue:

  - https://github.com/vmg/redcarpet/issues/720
2023-03-03 17:16:53 -08:00
Andrew Kvalheim
c54a8a1238 Add tests of HTML sanitization 2023-03-03 16:50:20 -08:00
Andrew Kvalheim
04f6a73d73 Add user to cache dependencies of event proposal tab
When fragment caching is enabled—

    --- a/config/environments/test.rb
    +++ b/config/environments/test.rb
    @@ -27 +26,0 @@
    -  config.action_controller.perform_caching = false
    @@ -29 +27,0 @@
    -  config.cache_store = :null_store

—the test of voting fails with:

    expected to find visible css ".rating.bright" … 0 times, found 3 matches
    expected to find visible css ".rating:not(.bright)" … 5 times, found 2 matches
    # ./spec/features/voting_spec.rb:21
    # ./spec/features/voting_spec.rb:21
    # ./spec/features/voting_spec.rb:57

i.e. the vote displayed in the event proposal tab is another user’s
vote, because the fragment’s cache dependencies don’t include the
current user.

resolves #2767
2023-03-01 11:52:16 -08:00
Andrew Kvalheim
1563881153 Add user to cache dependencies of vote in events index
When fragment caching is enabled—

    --- a/config/environments/test.rb
    +++ b/config/environments/test.rb
    @@ -27 +26,0 @@
    -  config.action_controller.perform_caching = false
    @@ -29 +27,0 @@
    -  config.cache_store = :null_store

—the test of voting fails with:

    expected to find text "Not rated" in "…You voted: 3/5…"
    # ./spec/features/voting_spec.rb:15
    # ./spec/features/voting_spec.rb:13
    # ./spec/features/voting_spec.rb:57

i.e. the vote displayed on the event index is another user’s vote,
because the fragment’s cache dependencies don’t include the current
user.

re #2767
2023-03-01 11:43:50 -08:00
Andrew Kvalheim
17366c6eab Update events when rated
When fragment caching is enabled—

    --- a/config/environments/test.rb
    +++ b/config/environments/test.rb
    @@ -27 +26,0 @@
    -  config.action_controller.perform_caching = false
    @@ -29 +27,0 @@
    -  config.cache_store = :null_store

—the test of voting fails with:

    expected to find css ".rating.bright" … 3 times but there were no matches
    expected to find visible css ".rating:not(.bright)" … 2 times, found 5 matches
    # ./spec/features/voting_spec.rb:31
    # ./spec/features/voting_spec.rb:30
    # ./spec/features/voting_spec.rb:53

i.e. the rating displayed on the event index is not updated after
voting, because while the fragment’s cache dependencies include the
event, voting doesn’t update the event.

re #2767
2023-03-01 11:33:21 -08:00
Andrew Kvalheim
4df59d85e2 Add test of voting 2023-03-01 11:17:39 -08:00
Andrew Kvalheim
5b89f64eaf Set default URL host
Setting the default host resolves:

    Missing host to link to! Please provide the :host parameter, set
    default_url_options[:host], or set :only_path to true

Configuring RSpec to use the default host resolves:

    Expected response to be a redirect to <http://test.host/…>
    but was a redirect to <http://localhost/…>.
2023-02-28 11:06:24 -08:00
depfu[bot]
e7c2375dcf
Update tilt to version 2.1.0 2023-02-24 17:45:28 +00:00
Henne Vogelsang
097470bb0c
Merge pull request #3125 from hennevogel/update/base-os
Update our base os
2023-02-02 18:58:27 +01:00
Henne Vogelsang
c5d46867c3
Stop installing bundler/foreman, it's done in osem/base now 2023-02-02 18:47:44 +01:00
Henne Vogelsang
13374571c9
Update ruby/bundler version to the one we use in osem/base 2023-02-02 18:47:43 +01:00
Henne Vogelsang
41287aea03
Remove outdated badges 2023-02-01 14:10:01 +01:00
Henne Vogelsang
164ae1cdc1
Add initial railway configuration 2023-02-01 13:45:27 +01:00
Henne Vogelsang
2844024ad8
Merge pull request #3086 from openSUSE/depfu/update/momentjs-rails-2.29.4.1
Update momentjs-rails: 2.29.1.1 → 2.29.4.1 (patch)
2023-01-24 13:43:13 +01:00
depfu[bot]
16584d0313
Update momentjs-rails to version 2.29.4.1 2023-01-23 10:55:38 +00:00
Henne Vogelsang
1f85d9d3f3
Merge pull request #3120 from openSUSE/depfu/update/rack-2.2.6.2
🚨 [security] Update rack: 2.2.4 → 2.2.6.2 (minor)
2023-01-23 11:54:48 +01:00
Henne Vogelsang
266049b27b
Merge pull request #3119 from openSUSE/depfu/update/globalid-1.0.1
🚨 [security] Update globalid: 1.0.0 → 1.0.1 (patch)
2023-01-23 11:54:37 +01:00
Henne Vogelsang
492a8907e8
Merge pull request #3109 from openSUSE/depfu/update/rails-html-sanitizer-1.4.4
🚨 [security] Update rails-html-sanitizer: 1.4.3 → 1.4.4 (patch)
2023-01-23 11:54:15 +01:00
Henne Vogelsang
3ead127065
Merge pull request #3108 from openSUSE/depfu/update/loofah-2.19.1
🚨 [security] Update loofah: 2.18.0 → 2.19.1 (minor)
2023-01-23 11:53:48 +01:00
depfu[bot]
4422ea0dae
Update rack to version 2.2.6.2 2023-01-20 16:30:34 +00:00
depfu[bot]
702e01b5af
Update globalid to version 1.0.1 2023-01-20 16:25:36 +00:00
depfu[bot]
65be3e1d03
Update rails-html-sanitizer to version 1.4.4 2023-01-20 16:20:51 +00:00
depfu[bot]
bfd9f9cd15
Update loofah to version 2.19.1 2023-01-20 16:15:30 +00:00
Henne Vogelsang
b7ed61680c
Merge pull request #3118 from openSUSE/depfu/update/nokogiri-1.14.0
🚨 [security] Update nokogiri: 1.13.8 → 1.14.0 (minor)
2023-01-20 17:10:16 +01:00
depfu[bot]
57847e4022
Update nokogiri to version 1.14.0 2023-01-19 22:15:49 +00:00
Henne Vogelsang
5652e41d79
Merge pull request #3104 from openSUSE/depfu/update/dalli-3.2.3
🚨 [security] Update dalli: 3.2.2 → 3.2.3 (patch)
2022-12-06 13:53:16 +01:00
depfu[bot]
dc42795afe
Update dalli to version 3.2.3 2022-11-24 02:05:38 +00:00
Stella Rouzi
7fc848fe9c Fix version history for deleted models
Resolves #2738
2022-10-27 11:35:20 +03:00
Stella Rouzi
ca3c5b5c32
Merge pull request #3091 from AlessandroMinoccheri/fix-typos-in-md-files
fix some typos in contributing and install files
2022-10-27 11:08:42 +03:00
Stella Rouzi
7b92754f29 Remove datepicker date limits 2022-10-19 16:24:48 +03:00
AlessandroMinoccheri
f98f6a5c31 fix some typos in contributing and install files 2022-10-08 09:50:27 +02:00
Andrew Kvalheim
6ce2e66f14 Correct time zone of API dates
Prior to this change, the API returned incorrect dates in UTC instead of
the conference time zone.
2022-09-28 13:22:15 -07:00
Andrew Kvalheim
397341a324 Use JSON date serializer
Effective API changes:

  - nil serializes to null, not empty string
  - dates serialize to IETF RFC 3339 with millisecond precision, not
    second precision surrounded by spaces
2022-09-28 09:34:01 -07:00
Andrew Kvalheim
b60257ef59 Add test of EventScheduleSerializer 2022-09-28 09:29:12 -07:00
Henne Vogelsang
9d98b30698
Merge pull request #3085 from AndrewKvalheim/css-ids
Use CSS-compatible row IDs in datatables
2022-09-14 12:26:16 +02:00
Andrew Kvalheim
57e9135287 Use CSS-compatible row IDs in datatables
In CSS IDs may not begin with a number:

  - https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
2022-09-13 11:06:22 -07:00
Henne Vogelsang
a4befea738
Merge pull request #3079 from openSUSE/depfu/update/skylight-5.3.3
Update skylight: 5.3.2 → 5.3.3 (patch)
2022-09-13 14:39:42 +02:00
Henne Vogelsang
69dd7bf5fd
Merge pull request #3084 from AndrewKvalheim/frozen_string_literal-first
`frozen_string_literal` is ignored after any tokens
2022-09-13 12:56:12 +02:00
Andrew Kvalheim
803f8daa9e Move frozen_string_literal magic comment to top of file
Resolves:

    $ RUBYOPT='-w' bundle --version
    Gemfile:4: warning: `frozen_string_literal' is ignored after any tokens
2022-09-11 19:07:11 -07:00
depfu[bot]
f1169fff19
Update skylight to version 5.3.3 2022-08-17 14:20:48 +00:00
Henne Vogelsang
38f266f716
Merge pull request #3078 from openSUSE/depfu/update/rails-assets-momentjs-2.29.4
Update rails-assets-momentjs: 2.29.3 → 2.29.4 (patch)
2022-08-17 16:12:03 +02:00
depfu[bot]
96872a3bac
Update rails-assets-momentjs to version 2.29.4 2022-08-16 15:25:35 +00:00
Henne Vogelsang
5ad165cca5
Merge pull request #3076 from openSUSE/depfu/update/rails-i18n-7.0.5
Update rails-i18n: 7.0.3 → 7.0.5 (patch)
2022-08-16 17:25:12 +02:00
depfu[bot]
1af975effa
Update rails-i18n to version 7.0.5 2022-08-02 11:40:47 +00:00
Henne Vogelsang
856a071bf2
Merge pull request #3070 from openSUSE/depfu/update/sprockets-4.1.1
Update sprockets: 4.0.3 → 4.1.1 (minor)
2022-08-02 13:38:34 +02:00
Henne Vogelsang
688dc1a817
Merge pull request #3069 from openSUSE/depfu/update/unicode-display_width-2.2.0
Update unicode-display_width: 2.1.0 → 2.2.0 (minor)
2022-08-02 13:37:29 +02:00
Natnael Getahun
e0beb2e475
Merge pull request #3068 from openSUSE/depfu/update/selenium-webdriver-4.3.0
Update selenium-webdriver: 4.2.1 → 4.3.0 (minor)
2022-07-08 10:18:30 +02:00
Natnael Getahun
e94c20d375
Merge branch 'master' into depfu/update/selenium-webdriver-4.3.0 2022-07-07 17:19:40 +02:00
Natnael Getahun
1111c9c52a
Merge pull request #3066 from openSUSE/depfu/update/pg-1.4.1
Update pg: 1.3.5 → 1.4.1 (minor)
2022-07-07 17:19:21 +02:00
depfu[bot]
02120ce795 Update pg to version 1.4.1 2022-07-07 16:10:19 +02:00