- 23 Feb, 2026 2 commits
-
-
Steven authored
-
Steven authored
- Add plugin/webhook/validate.go as single source of truth for SSRF protection: reserved CIDR list parsed once at init(), isReservedIP(), and exported ValidateURL() used at registration/update time - Replace unguarded http.Client in webhook.go with safeClient whose Transport uses a custom DialContext that re-resolves hostnames at dial time, defeating DNS rebinding attacks - Call webhook.ValidateURL() in CreateUserWebhook and both UpdateUserWebhook paths to reject non-http/https schemes and reserved/private IP targets before persisting - Strip internal service response body from non-2xx error log messages to prevent data leakage via application logs
-
- 22 Feb, 2026 7 commits
-
-
Steven authored
-
Steven authored
Switch from sessionStorage to localStorage so the auth token survives across tabs and browser restarts, matching standard platform behavior. Also guard the signup redirect in App.tsx behind profileLoaded to avoid a false redirect when the instance profile fetch fails.
-
Steven authored
When no token exists in sessionStorage, AuthContext.initialize() was still calling GetCurrentUser, triggering the auth interceptor to attempt RefreshToken and retry — producing a burst of 5+ auth API calls in under a second that reverse proxies with rate limiting (e.g. CrowdSec) flag as brute force. Add hasStoredToken() to auth-state and bail out of initialize() early when there is definitively no session to restore. The refresh flow for expired tokens is preserved since hasStoredToken() checks for presence regardless of expiry. Fixes #5647
-
Steven authored
The closest() selector was targeting a CSS class that never existed on the container, causing fallback to document.body and collecting task items across all visible memos. This caused index collisions when multiple memos with todo lists were on the page. Adds data-memo-content attribute to the container and updates the selector accordingly. Fixes #5635
-
Steven authored
Wrapping the returned function in useCallback prevents a new reference on every render, which was causing an infinite startViewTransition loop on the initial signup page (fresh install with no admin). Fixes #5626
-
Steven authored
-
milvasic authored
-
- 14 Feb, 2026 1 commit
-
-
Kaki021 authored
-
- 12 Feb, 2026 3 commits
- 11 Feb, 2026 3 commits
- 10 Feb, 2026 5 commits
-
-
boojack authored
Signed-off-by:boojack <stevenlgtm@gmail.com>
-
Steven authored
Fixes #5617
-
Steven authored
-
Steven authored
-
boojack authored
Signed-off-by:boojack <stevenlgtm@gmail.com>
-
- 09 Feb, 2026 3 commits
-
-
Steven authored
The PostgreSQL implementation returns 'PAT not found' when no rows match, while SQLite/MySQL return 'sql: no rows in result set' from QueryRowContext. Both behaviors are correct - the key fix is that PostgreSQL no longer throws JSONB errors on missing/malformed data. Changes: - Update test assertions to accept either error type - Fix comment punctuation for godot linter - Maintain backward compatibility across all database drivers
-
Steven authored
Fixes #5612, #5611 Root cause: PostgreSQL's jsonb_array_elements() throws errors when the 'tokens' key is missing or malformed, while SQLite/MySQL return NULL gracefully. This caused: - 502 errors when creating admin after v0.25.3 → v0.26.0 upgrade - Settings not persisting and users unable to stay logged in Changes to store/db/postgres/user_setting.go: - Remove strict JSONB operations from GetUserByPATHash query - Fetch all PERSONAL_ACCESS_TOKENS rows and filter in Go - Skip malformed/invalid JSON rows with continue (error recovery) - Match SQLite/MySQL's forgiving error handling New integration tests (store/test/user_setting_test.go): - TestUserSettingGetUserByPATHashNoTokensKey - TestUserSettingGetUserByPATHashEmptyTokensArray - TestUserSettingGetUserByPATHashWithOtherUsers New PostgreSQL-specific tests (store/db/postgres/user_setting_test.go): - TestGetUserByPATHashWithMissingData (comprehensive edge cases) - TestGetUserByPATHashPerformance (100+ users) - TestUpsertUserSetting (basic upsert) Test coverage:
✅ Missing PERSONAL_ACCESS_TOKENS key✅ Empty/malformed JSON data✅ Multiple users with mixed valid/invalid data✅ Performance with 100+ users✅ Error recovery without crashes Benefits: - No database migration required (TEXT column works fine) - Backward compatible with v0.25.3 upgrades - Handles missing/corrupt data gracefully - Consistent behavior across all database drivers -
MuLingQwQ authored
-
- 08 Feb, 2026 6 commits
- 07 Feb, 2026 1 commit
-
-
Johnny authored
-
- 05 Feb, 2026 2 commits
-
-
Steven authored
Fixes #5589 When the page returns from background to foreground after the JWT token expires (~15 min), React Query's automatic refetch-on-focus triggers multiple API calls simultaneously. These all fail with 401 Unauthorized, leaving the user with empty content. Solution: - Add useTokenRefreshOnFocus hook that listens to visibilitychange - Proactively refresh token BEFORE React Query refetches - Uses 2-minute buffer to catch expiring tokens early - Graceful error handling - logs error but doesn't block Changes: - Created web/src/hooks/useTokenRefreshOnFocus.ts - Updated isTokenExpired() to accept optional buffer parameter - Exported refreshAccessToken() for use by the hook - Integrated hook into AppInitializer (only when user authenticated)
-
Steven authored
-
- 04 Feb, 2026 4 commits
-
-
Steven authored
Removed the hide-scrollbar CSS class and all its usages throughout the codebase. Hiding scrollbars can hurt UX by making it unclear when content is scrollable. Changes: - Removed hide-scrollbar CSS definition from index.css - Removed hide-scrollbar class from Navigation component (2 instances) - Removed hide-scrollbar class from MemoDetailSidebar (2 instances) - Removed hide-scrollbar class from TagsSection - Removed hide-scrollbar class from ShortcutsSection Components now use standard browser scrollbar behavior, which provides better visual feedback to users about scrollable content. Modern browsers already handle scrollbar appearance elegantly.
-
Steven authored
Fixed issue #5579 where the calendar selection dialog was very laggy. The root cause was rendering ~365 individual Tooltip components when opening the year calendar view (one per day with activity). This created a huge number of DOM nodes and event listeners that caused significant performance issues. Changes: - Added disableTooltips prop to MonthCalendar and CalendarCell components - Disabled tooltips in YearCalendar's small month views - Removed unnecessary TooltipProvider wrapper in YearCalendar - Tooltips remain enabled in the default month calendar view Performance improvements: - Eliminates ~365 tooltip instances when dialog opens - Reduces initial render time significantly - Makes dialog interactions smooth and responsive Users can still click on dates to drill down for details if needed.
-
Steven authored
Fixed issue #5576 where clicking the edit button on a shortcut would incorrectly open a create dialog instead of an edit dialog. The root cause was an incorrect useEffect that was watching the shortcut state itself instead of the initialShortcut prop. When the dialog was opened for editing, the state wasn't properly reinitializing with the existing shortcut data. Changed the useEffect to: - Watch initialShortcut as the dependency - Reinitialize the shortcut state when initialShortcut changes - Properly distinguishes between create (initialShortcut undefined) and edit (initialShortcut has data) modes
-
memory_clear authored
Signed-off-by:memory_clear <83893503+MemoryClear@users.noreply.github.com>
-
- 03 Feb, 2026 2 commits
-
-
Steven authored
- Add validation check for loading state before allowing save - Prevents false "Content, attachment, or file required" error - Occurs when user presses CTRL+Enter immediately after opening edit mode - Editor state may still be loading when keyboard shortcut fires Closes #5581
-
Steven authored
- Fix nested task lists not showing proper indentation - Use simple CSS cascade with [&_ul.contains-task-list]:ml-6 - Fix checkbox clicks toggling wrong tasks in nested lists - Search from memo root container for global task indexing - Remove complex selectors in favor of standard approach - Match behavior of GitHub, Notion, and other platforms Closes #5575
-
- 02 Feb, 2026 1 commit
-
-
Steven authored
Fixes issue where OAuth sign-in fails with 'Cannot read properties of undefined (reading 'digest')' when accessing Memos over HTTP. The crypto.subtle API is only available in secure contexts (HTTPS or localhost), but PKCE (RFC 7636) is optional per OAuth 2.0 standards. Changes: - Make PKCE generation optional with graceful fallback - Use PKCE when crypto.subtle available (HTTPS/localhost) - Fall back to standard OAuth flow when unavailable (HTTP) - Log warning to console when PKCE unavailable - Only include code_challenge in auth URL when PKCE enabled The backend already supports optional PKCE (empty codeVerifier), so no backend changes needed. This fix aligns frontend behavior with backend. Benefits: - OAuth sign-in works on HTTP deployments (reverse proxy scenarios) - Enhanced security (PKCE) still used when HTTPS available - Backward compatible with OAuth providers that don't support PKCE Fixes #5570
-