mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 17:45:18 -05:00
"Disable all import" says the server rejects any import request, and most import paths asked assertImportEnabled(), but trelloStartImport and trelloResumeImport, importIcsToBoard and its REST route, and scrum.importIntoBoard did not. They ask now, after their argument checks. tests/importDisabledEverywhere.test.cjs holds it tree-wide: every server method or REST route whose name says it imports asks assertImportEnabled(), directly, through a file-local helper or by handing the request to importBoard, or is listed with the reason it is no import of board data. Thanks to xet7 !
8.0 KiB
8.0 KiB
Admin Panel / Settings / Security
What it is
Server-wide switches for what rich text may do and what may be imported or
exported. Address: /admin/settings/security. Site administrators only. Each
switch is saved as soon as it is ticked, is off by default, and is enforced on
the server - hiding a menu item is never the only thing it does.
Until 2026-11-19 this pane was Admin Panel / Problems / Security;
/admin/problems/security redirects here. It is a setting, not a report.
Read more
- Markdown and HTML sanitization on Wikipedia - what the two rich-text switches act on.
- Cross-site scripting on Wikipedia - why showing all code as plain text is a safe mode.
- Data anonymization and Pseudonymization on Wikipedia - what the anonymize switches do.
- Import and export formats in WeKan.
How to use it
- Open Admin Panel / Settings / Security.
- Tick the switches you need. Each is saved at once; Largest import (MB) is saved when you leave the field.
Rich text
- Render links as plain text - every link, both markdown links and raw HTML
<a href>tags, is shown as plain, non-clickable text in every rich text field (board and card titles, descriptions, comments, checklists, ...). This prevents misleading clickable links. - Always show all code as plain text - rich text is never rendered as markdown or HTML: the whole source is shown as plain text, which reveals hidden content - HTML comments, the target of markdown links, JavaScript and any other code - so nothing is clickable or running.
Import and export
- Disable all import - every import is off: WeKan JSON, Trello, CSV/Excel, Jira, Kanboard, NextCloud Deck, OpenProject, GitHub, GitLab, Gitea and Forgejo, and cloning a board. The menu options are hidden and the server refuses any import request - the Trello API, iCalendar and Scrum transfer imports too (Settings enforced on the server).
- Largest import (MB) - the largest file the Import page accepts. Empty is no limit (the box shows No limit): a file may be as large as the free disk space lets the import finish. Every upload is written to the server's disk a part at a time and an import that would fill the disk is refused (Large files).
- Disable all export - every export is off: WeKan JSON, CSV, Excel, Kanboard, and to NextCloud Deck / OpenProject / GitHub / GitLab / Gitea / Forgejo, and single-attachment export.
- Disable import avatars - profile pictures are never imported: WeKan JSON and Trello import, and avatar sync from LDAP or OIDC/OAuth2 on login. Names and other data are still imported.
- Disable export avatars - profile pictures are never included in a board export (WeKan JSON and CSV).
- Anonymize import users - importing a WeKan JSON board replaces every
imported user's username, full name and initials with
user1,user2, ..., drops their avatar, and rewrites@usernamementions and the requested-by / assigned-by fields in card and comment content. No real identity from the source board is stored. - Anonymize export users - the same for exporting: the exported file carries no real user identity.
The word "user" in the placeholders follows the language of the person importing or exporting.
How the numbers are calculated
- Largest import (MB): a whole number of megabytes; the value is rounded
down, and empty or 0 removes the limit (
importMaxMegabytesis unset). The server turns it into bytes asMB × 1024 × 1024(importLimitBytes()in server/lib/importDiskSpace.js). - Free disk space for an import is the free space of the disk less a
reserve of 512 MB (
IMPORT_DISK_RESERVE_MBchanges it), so an import that would fit to the last byte is still refused. - Anonymized names: the users of the board are sorted by their
_idand numbered from 1, so the same board always gets the same labels. Username and full name become<word><n>(user1,käyttäjä1, ...), initials the first letter of the word in upper case followed byn(U1) (buildUserAnonymizationMap()in models/lib/importExportSecurity.js).
How it works in WeKan
- Fields on the settings document
(models/settings.js):
renderLinksAsPlainText,alwaysShowCodeAsText,disableAllImport,importMaxMegabytes,disableAllExport,disableImportAvatars,disableExportAvatars,anonymizeImportUsers,anonymizeExportUsers. The pane is templatefeaturesSecurityin client/components/settings/adminProblems.jade, its handlers in adminProblems.js; only a site administrator may update the settings document (server/permissions/settings.js). - Rich text: the viewer in
client/components/main/editor.js
strips links when
renderLinksAsPlainTextis on, and sets the Markdown package'salwaysShowCodeAsTextflag (packages/markdown/src/template-integration.js). - Import and export:
models/lib/importExportSecurity.js
holds
assertImportEnabled()(called by every import method,cloneBoardincluded, in models/import.js and the import routes),assertExportEnabled()andrefuseDisabledExport()(every export method and HTTP route; an export asked for while export is disabled is recorded in Admin Panel / Problems asauthz.export-disabled), and the anonymization helpers. The Blaze helpersimportDisabledandexportDisabledin client/config/blazeHelpers.js hide the menu options. - Tests: tests/externalLinkAutolink.test.cjs, tests/crossBoardExportBleed.test.cjs, tests/importUpload.test.cjs, tests/userAnonymization.test.cjs and tests/scrumAnonymization.test.cjs.
Related
- Activities and notifications
- Delete
- Admin Panel / Problems / Security Report - what the security log has recorded.
Commits
- The pane moves from Problems to Settings
- Largest import (MB), and uploads checked against the free disk space
- Every export obeys Disable all export and Anonymize export users (CrossBoardExportBleed)
- Anonymization also covers Scrum text
- Tests and docs for the Security switches
- Import and export privacy switches
- Always show all code as plain text
- Render links as plain text