955 Commits
Author SHA1 Message Date
NGPixel 34cd445a46 fix: users + groups permissions assign logic + text hints 2026-04-27 04:15:54 -04:00
NGPixel 188d36e6bb fix: prevent user assignment to elevated groups 2026-04-20 06:03:17 -04:00
Kolega.devandkolega.dev d14b0a5509 fix: authenticate GraphQL subscription WebSocket connections (#7922)
The onConnect handler for GraphQL subscriptions was empty, allowing any
client to establish a WebSocket connection and subscribe to loggingLiveTrail
without authentication. Added JWT verification in onConnect using the same
RS256 credentials and permission checks (manage:system) used elsewhere.

Co-authored-by: kolega.dev <faizan@kolega.ai>
2026-02-11 21:40:25 -05:00
Kolega.devandkolega.dev 7ae6635d16 fix: validate loginRedirect cookie to prevent open redirect (#7923)
The loginRedirect cookie value was used directly in res.redirect() and
window.location.replace() without validation, allowing redirection to
arbitrary external URLs. Added validation to ensure the redirect target
is a relative path before use.

Co-authored-by: kolega.dev <faizan@kolega.ai>
2026-02-11 21:27:36 -05:00
mod242 6ae53bf1bd feat: map OIDC/OAuth2 avatar claims to user pictureUrl (#7908) 2026-01-23 18:36:52 -05:00
NGPixel 1d0d87af6e fix: add cookie secure flag when site is using https 2026-01-08 04:22:22 -05:00
NGPixel 7d4627ba0b fix: rocketchat auth prototype pollution via userProfile function 2026-01-08 03:40:26 -05:00
Felix Eckhofer b950e065e9 fix: stop dompurify from breaking draw.io diagrams (#7888)
Newer versions of dompurify strip <foreignobject> tags if not explicitly
allowed. See https://github.com/cure53/DOMPurify/issues/1040

Fixes #7744
2026-01-06 16:56:35 -05:00
NGPixel 028dcd5656 fix: use promisified pipeline from stream 2026-01-06 00:54:56 -05:00
NGPixel 4eb9dabb63 refactor: update docker images to Node 24 and fix promisify calls 2026-01-03 03:03:15 -05:00
Mia Moir 8b358fc264 fix: Update keycloak authentication definition hints (#7809)
Update keycloak authentication definition to match endpoints recommended by keycloak at https://www.keycloak.org/securing-apps/oidc-layers
2025-12-31 21:02:42 -05:00
Karl BerggrenandNicolas Giard 5c80184a1d feat: add support for database connection via socketPath when using mysql2 driver (#7839)
* Added support for database socketPath in configure file when using dbClient mysql2 (mysql or mariadb)

* refactor: mysql dbConfig to conditionally set socketPath

Updated database configuration to conditionally include socketPath from WIKI.config.

* fix: socketPath assignment typo

---------

Co-authored-by: Nicolas Giard <github@ngpixel.com>
2025-12-31 20:53:47 -05:00
ss033andNicolas Giard a02e0131c1 fix: enhance logging for Google and GitHub OAuth2 authentication (#7848)
Co-authored-by: Nicolas Giard <github@ngpixel.com>
2025-12-31 20:44:14 -05:00
scottnursten-22andNicolas Giard 407aacfa19 fix(search): always ensure pg_trgm extension availability for PostgreSQL search (#7845)
* fix(search): ensure pg_trgm extension availability for PostgreSQL search

- Move pg_trgm extension creation to initialization phase to ensure availability
- Add error handling for similarity search queries that depend on pg_trgm
- Add proper logging for debugging search-related issues

Fixes issues where PostgreSQL search suggestions fail due to missing or
improperly initialized pg_trgm extension, particularly in containerized
environments where extension creation timing matters.

* fix: Simplify error handling in search suggestion logic

Refactor error handling for search suggestions to simplify code.

---------

Co-authored-by: Nicolas Giard <github@ngpixel.com>
2025-11-13 15:27:26 -05:00
Benoît des Ligneris 54d21ae538 fix: add tor1 region to DigitalOcean spaces list (#7832) 2025-10-28 13:39:14 -04:00
dhulripos b49c00226c fix: Add missing status code on unauthorized access (#7785)
* fix status code on unauthorized

* Remove unnecessary line breaks
2025-09-24 00:06:37 -04:00
Craig Reyenga cd77f36120 fix: requests without user-agent causing error 500 (#7749) 2025-08-18 21:38:20 -04:00
Ole Christian TvedtandOle Christian Tvedt c093423307 feat: set groups based on Azure groups (#7736)
Co-authored-by: Ole Christian Tvedt <ole.christian.tvedt@defa.com>
2025-08-13 02:53:19 -04:00
Nicolas Giard 403e98dced feat: add git always namespace option 2025-02-02 16:16:52 -05:00
Vasily FedoseyevandNicolas Giard abc8dce9cc fix: Allow HA_ACTIVE: True to enable HA mode (#7493)
---------

Co-authored-by: Nicolas Giard <github@ngpixel.com>
2025-01-01 00:18:42 -05:00
Jacob Beneski 7757de3af7 feat: add elasticsearch 8.x support (#6904) 2024-10-12 04:38:43 -04:00
Nicolas Giard b9fb17d4d4 fix: prevent password reset on disabled account 2024-08-29 03:06:06 -04:00
Nicolas Giard 904260fd44 fix: set no-store cache control on jwt renew response 2024-05-23 23:01:38 -04:00
EthanandNGPixel 1238d614e1 Merge pull request from GHSA-xjcj-p2qv-q3rf
* Update render.js

# Improved handling of mustache expressions and v-pre attribute assignment

## Changes Made:
- Ensured that the parent tag of such text nodes is explicitly set to a `<p>` tag with the `v-pre` attribute.
- Added debug messages for better understanding of the script execution flow [THIS SHOULD REMOVED WHEN PUSHING TO PRODUCTION].

## Why it Works:
- When a mustache expression is found, the script either wraps it in a new `<p>` tag with the `v-pre` attribute or adds the `v-pre` attribute to the existing parent `<p>` tag.
- This approach ensures that the template code is not removed but encapsulated within `<p>` tags with the `v-pre` attribute, as required.

## Test Cases Passed:
1. `<xyz>{{ constructor.constructor('alert(1)')() }}</xyz>`
2. `<xyz>{{ constructor.constructor('alert(1)')() }}</xyz>`
3. `<p><xyz>{{ constructor.constructor('alert(1)')() }}</p>`
4. `<p><xyz>{{ constructor.constructor('alert(1)')() }}</xyz></p>`
5. `<p>&lt;xyz&gt;{{constructor.constructor('alert("Test Case 8")')()}}&lt;xyz&gt;{{constructor.constructor('alert("Test Case 9")')()}}&lt;/xyz&gt;</p>`

This commit enhances the robustness and reliability of handling mustache expressions and ensures proper assignment of the `v-pre` attribute, to ensure that there is no room for the weaponization of the template code later in the rendering process.

* fix: move template expressions after dom-purify + handle text nodes without parent

---------

Co-authored-by: NGPixel <github@ngpixel.com>
2024-05-13 14:57:17 -04:00
CDNandNicolas Giard f1161aed59 fix: make comment module "Artalk" work with newer versions (#6901)
* feat: update comment module "Artalk"
* fix: update code.yml

---------

Co-authored-by: Nicolas Giard <github@ngpixel.com>
2024-04-24 20:58:53 -04:00
Nicolas Giard abdd2f0d17 fix: remove upper range node.js version check 2024-04-24 20:46:11 -04:00
Nicolas Giard b1e1759f25 fix: set securityTrustProxy to false by default 2024-01-28 20:03:06 -05:00
Jasmine Tai 99e74e8eb2 feat: upgrade markdown-it-emoji to 3.0.0 (#6945) 2024-01-22 20:20:01 -05:00
38a46e68ea feat: sync groups with SAML provider (#6299)
* feat: added implementation for group mapping in SAML strategies

---------

Co-authored-by: Abderraouf El Gasser <abderraouf.elgasser@iktos.com>
Co-authored-by: Nicolas Giard <github@ngpixel.com>
2023-11-20 16:59:33 -05:00
Pablo 8932d15c0c fix: typo in kroki name (#6745) 2023-09-24 23:30:28 -04:00
Jason Minard 491d63ceee fix(auth): keycloak authentication post logout redirect for Keycloak 18+ (#5878) 2023-08-10 17:45:06 -04:00
NGPixel 3855d2c853 fix: add node 18 + 20 compatibility 2023-08-10 17:15:02 -04:00
Jaeseo ParkandNicolas Giard d75fc76c0c feat: add markdown-it-pivot-table rendering module (#6574)
* feat: markdown-it-pivot-table

* chore: upgrade dependency version

* style: remove semicolon in renderer.js

---------

Co-authored-by: Nicolas Giard <github@ngpixel.com>
2023-07-28 14:34:42 -04:00
Andrew McFaddenandNicolas Giard db8a09fe8c feat: add ACR Value option to OIDC Module (#6553)
---------

Co-authored-by: Nicolas Giard <github@ngpixel.com>
2023-07-05 18:18:21 -04:00
matt1097 f02b7ba94e fix(git): Reduce git concurrency to avoid lock file conflicts. (#6511) 2023-06-16 17:07:31 -04:00
CDNandNicolas Giard 4e5e8309a6 feat: add v2 of analytics module umami (#6442)
* feat: create analytics module umami2

---------

Co-authored-by: Nicolas Giard <github@ngpixel.com>
2023-06-03 23:21:27 -04:00
Kyle Gehmlich 545ba4ec95 fix: remove duplicate query parameters on HTTPS redirect (#6460)
HTTPS redirection rebuilds the full URL using req.originalUrl, which
includes query parameters (see
https://expressjs.com/en/api.html#req.originalUrl). Prior to this patch,
appending the stringified query params to req.originalUrl resulted in
duplicate parameters, e.g.
wiki.js/callback?session=123&code=abc?session=123&code=abc
which caused errors when being redirected from an insecure (http://)
callback URL to a secure version when using OIDC (e.g. with keycloak).

This issue is probably rare, but in cases where HTTPS redirection is
enabled and a user tries to hit an insecure URL with query parameters,
it could cause problems.
2023-06-03 23:19:01 -04:00
Nicolas Giard 3bf1d9cf28 fix: disable template compilation in source view 2023-06-03 23:15:22 -04:00
Nicolas Giard e1d282ad11 feat: warn and exit on unsupported node version 2023-05-11 21:10:15 -04:00
DerekJarvisandNicolas Giard fd00272314 feat(auth): allow custom GitLab endpoints for self-managed instances (#6399)
* Allow custom GitLab endpoints for self-hosting

---------

Co-authored-by: Nicolas Giard <github@ngpixel.com>
2023-05-11 20:42:17 -04:00
robinho81andRobin Chalmers 8db4be668b feat: expose skipUserProfile option in passport-oidc (#6190)
Co-authored-by: Robin Chalmers <robin.chalmers@kairostech.no>
2023-03-17 17:58:41 -04:00
Charlotte County Public Schools 5acc7e752e fix: add new props to existing auth strategies (#6250) 2023-03-17 17:27:31 -04:00
NGPixel 490fab1173 fix: handle empty ToC position value 2023-02-16 23:58:52 -05:00
NGPixel e495e0aaab fix: update google analytics field help to refer to the new ID format 2023-02-16 22:39:23 -05:00
NGPixel e954b50a7a feat: footer text override option 2023-02-16 20:45:55 -05:00
Dan NicholsonandNicolas Giard 78a35c377c feat: include query parameters in locale redirect (#6132)
* feat: include query parameters in locale redirect

* refactor: code cleanup

---------

Co-authored-by: Nicolas Giard <github@ngpixel.com>
2023-02-16 19:04:19 -05:00
gueldiandNicolas Giard bba1d1b574 fix(oidc): use _json prop when setting displayName (#6135)
* Fixes setting displayName from OIDC

Relates to: https://github.com/requarks/wiki/pull/6096

* Update authentication.js

---------

Co-authored-by: Nicolas Giard <github@ngpixel.com>
2023-02-07 22:00:26 -05:00
NGPixel ac930fc23e fix: change simple-git import 2023-02-04 16:09:41 -05:00
Eric KnibbeandNicolas Giard 2e8585478f fix(git): handle file renames between folders (#6020)
* git storage: handle file renames between folders

---------

Co-authored-by: Nicolas Giard <github@ngpixel.com>
2023-01-29 23:09:33 -05:00
Charlotte County Public SchoolsandNicolas Giard 8fa771c4ce feat: set groups based on LDAP groups (#5903)
* Add mapping ldap groups to wiki groups
---------

Co-authored-by: Nicolas Giard <github@ngpixel.com>
2023-01-29 22:52:21 -05:00