Commit graph

76 commits

Author SHA1 Message Date
Johannes Millan
4a99e7e505
fix(security): stored XSS → RCE chain — note image, plugin nodeExecution, CSP (GHSA-78rv-m663-4fph) (#8178)
* fix(ui): prevent stored XSS in enlarge-img directive

The enlarged-image element was built by interpolating the image URL into an innerHTML string, so a crafted synced/imported note.imgUrl could break out of the src attribute and inject an event handler (stored DOM-XSS). Build the <img> with createElement and property assignment instead, so the URL is never parsed as HTML. Adds a regression spec.

Refs: GHSA-78rv-m663-4fph

* fix(plugins): authorize nodeExecution from main-process state

The Electron main process authorized Node execution from the manifest the renderer passes on each IPC call, and window.ea.pluginExecNodeScript is callable by any renderer code — so injected renderer JS could forge {permissions:['nodeExecution']} and run arbitrary Node (CWE-501).

The main process now keeps its own grantedPlugins set, populated via a dedicated PLUGIN_SET_NODE_CONSENT channel. The renderer registers a grant in _fireOnReady (before the first node call, covering every load path including zip upload) and revokes it on teardown. The executor requires set membership.

Defense in depth, not a hard boundary: the registration channel is itself renderer-reachable, so a fully-compromised renderer could register a grant itself. It blocks the disclosed PoC (forged manifest for a never-loaded plugin) and removes per-call manifest trust. A hard boundary needs a main-process consent dialog.

Refs: GHSA-78rv-m663-4fph

* fix(security): add object-src 'none' and document CSP constraints

Adds object-src 'none' (the app embeds no <object>/<embed>) and replaces the stale TODO with an accurate note on why 'unsafe-eval'/'unsafe-inline' cannot be dropped yet: the plugin runtime and the inline bootstrap script use new Function, and the packaged app loads the renderer over file:// (opaque origin), so tightening script-src to 'self' is unreliable.

Refs: GHSA-78rv-m663-4fph
2026-06-08 20:20:17 +02:00
Johannes Millan
00d97bffbe fix(splash): keep productivity-tip heading readable on dark theme
The global :where(h1..h6):not(...):not(...):not(...) rule in page.scss
pins h2 color to --text-color-most-intense, which defaults to black on
:root and only flips to white once body.isDarkTheme is added at
bootstrap. During the pre-bootstrap splash the heading was therefore
black on the dark body background. Target the heading by id so the
selector clears the page rule's (0,3,0) specificity and let it inherit
the body color (already correct for both prefers-color-scheme modes).
2026-04-21 21:50:52 +02:00
Johannes Millan
eed462fab9 fix: show black logo on loading screen for light system theme
Move the prefers-color-scheme media query after the default fill rule
so the light theme override (fill: #000) is not overridden by the
later default (fill: #fff) due to CSS cascade ordering.
2026-03-20 21:36:30 +01:00
Johannes Millan
d7a14602fa fix: make loading screen logo visible on dark backgrounds
Move SVG logo fill from inline style to CSS, defaulting to white
and switching to black for light color scheme via media query.
2026-03-20 21:36:30 +01:00
Johannes Millan
7b136ecc14 fix(ios): show browser update message on unsupported iOS versions (#6889)
The app targets ES2022+/Safari 18+ but the iOS deployment target was 14.0.
On older iOS versions (e.g., 15), the JavaScript fails to parse, leaving
users stuck on a white splash screen with no feedback.

- Add an inline ES5-compatible browser check in index.html that detects
  unsupported browsers and shows a helpful update message
- Raise iOS deployment target from 14.0 to 16.0 in both project.pbxproj
  and Podfile
- Guard productivity tips script against null elements when compat check
  replaces splash screen content
2026-03-20 21:36:30 +01:00
Johannes Millan
49952c5c6a feat(android): add native startup overlay for quick task entry
Show a native FAB button during app startup so users can add tasks
while Angular bootstraps. Tapping the FAB expands a themed input bar
with keyboard tracking. Submitted tasks queue in SharedPreferences
via WidgetTaskQueue and are processed by AndroidEffects after
hydration. Partial (unsubmitted) text transfers to the web AddTaskBar
via sessionStorage.

Design:
- Two-phase dismiss keeps native overlay visible until web input mounts
- MutationObserver with resolved guard detects AddTaskBar readiness
- Day/night theme support with primary-colored border
- FAB color (#6495ED) matches the loading spinner
- Overlay cleaned up in onDestroy to prevent listener leaks

Also removes the old Quick Add Widget (QuickAddActivity,
QuickAddWidgetProvider, and all associated resources).

Also modernizes the loading spinner from double-bounce to a subtle
pulse animation.
2026-03-18 13:14:10 +01:00
Gitoffthelawn
a154ddd036
Making a good first impression! ;) (#6371)
* Making a good first impression! ;)

The first animated element the user sees is a productivity tip.  But they had an issue when presented in the snackbar: a colon appears after the heading and before the rest of the text.  This caused many of the tips to not look right.

The solution was to modify the code that adds that colon or to modify this code.  I chose to modify this code.

While I was here, I cleaned things up a bit.

I also added several new productivity tips!

I'm currently only using SP on the desktop (that will hopefully be changing soon), so please be sure these improvements work for all platforms before integrating this PR.

* Added missing comment.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Create _prettier_01

* Rename _prettier_01 to code_prettier_01.yml

* Ran Prettier on code

* Delete .github/workflows/code_prettier_01.yml

* Even Prettier Prettier

* Prettier

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-06 16:50:53 +01:00
Pue-Tsuâ
9a9e31f36a
Adding Ctrl-V pasting function from clipboard. (#5998)
* docs(clipboard): Added the plan to guide AI implementation.

* feat(clipboard): Changed requirement to reflect the fact that some functions can't be done in browsers.

* feat(clipboard): Added Ctrl-v pasting functionality from clipboard.

- Storing image in IndexedDB in browser, and storing image in userdata path in Electron.
- Added image resizing in markdown.

* docs(clipboard): Removed requirement file since it's implemented.

* feat(clipboard): Added clipboard images management in settings.

* feat(tests): Enhance focus mode and inline markdown tests with mock store and actions

* feat(clipboard): Add electron-only annotation to findImageFile function

* feat(clipboard): Prevent memory leaks by revoking cached blob URLs on image deletion

* feat(clipboard): Improve paste handling by tracking current placeholder and cleaning up old progress

* Merge branch 'master' into feat/clipboard-files

* feat(marked-options): Refactor renderer methods and add hooks for image sizing syntax

* feat(clipboard): Added feature that pasted image will be added to task attachment.

* revert: Revert the change of lock file from last merge.

* revert: Removed unwanted changes.

* refactor(clipboard): Cleaned up code that seems not necessary.

* feat(clipboard): Handle storage quota exceeded error and update messages

* feat(clipboard): Implement validated IPC handlers for clipboard image operations

* feat(clipboard): Add error handling for clipboard image URL resolution

* feat(clipboard): Refactor file operations to use async fs promises

* feat(clipboard): Integrate ClipboardPasteHandlerService for improved paste handling

* feat(clipboard): Rename resolveUrl to resolveIndexedDbUrl for clarity and update references

* feat(clipboard): Add defaultPath option to showOpenDialog for improved user experience

* feat(clipboard): Implement getDefaultClipboardImagesPath utility for consistent image path retrieval

* feat(clipboard): Refactor MIME type handling to use centralized mapping for improved maintainability

* feat(clipboard): Add computed property to toggle markdown parsing based on formatting settings

* revert: Removed unwanted changes.

* revert: Removed unwanted chagnes.

* revert: Removed unwanted chagnes.

* fix(clipboard-images-cfg): remove debug log from selectImagePath method

* refactor(paste-handler): update currentPlaceholder to use getter/setter methods

* fix(docs): correct formatting and improve clarity in multiple wiki pages

* fix: update dialog handling in initLocalFileSyncAdapter for type safety

* revert: Revert space change.

* fix(inline-markdown): ensure model is set to an empty string instead of undefined

* fix(tests): update clipboard images section locator to use collapsible title
2026-02-04 15:46:51 +01:00
johannesjo
ae0ca10c57 fix(ios): extend viewport behind safe areas to fix bottom white area
Add viewport-fit=cover to the viewport meta tag so iOS extends the web
view behind the home indicator area, allowing the bottom navigation
background color to fill the entire screen.
2026-01-16 16:52:58 +01:00
Johannes Millan
58fca6433d fix: update content security policy to fix dropbox sync with decompression 2025-11-24 14:38:02 +01:00
Johannes Millan
4d9d0d1d2a fix: handle web view compatability check in android rather than in index.html 2025-11-01 13:18:33 +01:00
Johannes Millan
a9828ed5da feat: improve webview fallback experience 2025-11-01 12:35:12 +01:00
Johannes Millan
8db2449340 feat: remove button, since it is not helpful for f-droid
#5384
2025-10-30 13:32:32 +01:00
Johannes Millan
a6fd1db1a1 feat: add warning about android system webview
#5384
2025-10-30 13:28:45 +01:00
Johannes Millan
ac833bf70c Revert "build: try to fix lighthouse 3"
This reverts commit 6e5e237856.
2025-10-29 19:40:18 +01:00
Johannes Millan
6e5e237856 build: try to fix lighthouse 3 2025-10-29 19:05:06 +01:00
Johannes Millan
4c94eeb578 feat: add open sans as default font 2025-09-04 18:30:09 +02:00
Johannes Millan
24fced4617 feat(plugins): update plugin infrastructure and cleanup 2025-07-10 15:06:48 +02:00
Johannes Millan
4b15ac1fc1 fix(plugin): uploaded plugins not working 2025-07-03 13:32:49 +02:00
Johannes Millan
f3d30c8f85 fix: canvas confetti error 2025-06-15 11:43:52 +02:00
Johannes Millan
eee784e26a add bloody nine quote 2025-04-24 11:41:05 +02:00
Johannes Millan
7e21bd3dd9 feat: initial load color 2025-04-15 12:23:00 +02:00
Johannes Millan
5ff997faa0 feat: add lazy loading 2025-04-15 10:29:48 +02:00
Johannes Millan
14db44264c feat: prevent zooming in page involuntarily 2025-02-12 14:24:38 +01:00
Johannes Millan
316a40c149 feat: add new productivity tip 2024-10-23 15:06:28 +02:00
Johannes Millan
8d871d80d8 migrate: make es lint work 2024-06-18 11:06:34 +02:00
Johannes Millan
f3ecc74501 feat: add quote 2024-06-05 09:39:49 +02:00
Johannes Millan
03b0080a41 feat: add productivity tip 2024-02-16 13:05:49 +01:00
Johannes Millan
240147b52e feat: add new productivity tip 2023-11-16 16:22:57 +01:00
Johannes Millan
48f98ecca1 feat: add additional productivity tipps 2023-09-15 14:52:31 +02:00
Johannes Millan
9ac68ff394 refactor: add singleAttributePerLine rule for prettier (finally!) 2022-03-18 18:20:15 +01:00
Johannes Millan
fc899761fd feat: add my own quote about complex problems :) 2022-01-29 12:18:59 +01:00
Johannes Millan
4a68767769 feat: add new motivational message 2021-05-23 20:26:37 +02:00
Johannes Millan
beb410b10d refactor: uglify thanks to prettier 2021-05-06 23:09:58 +02:00
Johannes Millan
17f4893e57 feat: bundle roboto 2021-01-04 20:38:22 +01:00
Johannes Millan
aa71440a9a refactor: code formatting 2
Signed-off-by: Johannes Millan <johannes.millan@gmail.com>
2020-12-25 10:29:59 +01:00
Johannes Millan
f5366c7ea1 feat: add new quote 2020-10-18 15:25:47 +02:00
Johannes Millan
0bc58c76b0 feat(backgroundImage): show on page load as well 2020-10-16 15:13:02 +02:00
Johannes Millan
c943ac98d2 feat: allow custom background images 2020-10-14 23:08:54 +02:00
Johannes Millan
54c83109f4 feat: change default background color and add little app start ani 2020-10-14 17:40:07 +02:00
Johannes Millan
2c8255b081 fix: allow to display images from file system #549 2020-10-02 15:30:22 +02:00
Johannes Millan
a53878ab31 feat: add new productivity tips 2020-09-27 01:03:55 +02:00
Johannes Millan
b7d44e78b7 feat: various model adjustments leftover from blockstack branch 2020-05-28 22:55:06 +02:00
Johannes Millan
56d2adcd70 refactor: fix code formatting 2020-01-06 19:53:26 +01:00
Johannes Millan
cc0b74ff75 feat: adjust web app icons 2019-10-11 19:13:05 +02:00
Johannes Millan
79dfa1530c feat: add new productivity tip 2019-10-11 19:02:09 +02:00
Johannes Millan
dcad1d7368 fix(reDesign): remove invalid manifest link 2019-09-21 15:21:50 +02:00
Johannes Millan
5d6aaa0664 feat: update all icons (apart from appx) 2019-09-15 17:16:06 +02:00
Johannes Millan
906e1cd4e2 refactor: code formatting for ts 2019-07-01 23:23:59 +02:00
Johannes Millan
48ff060439 feat(ui): add also italic font 2019-06-30 22:43:57 +02:00