Commit Graph

568 Commits

Author SHA1 Message Date
BillionClaw aebd51788b fix: improve error messages for file/folder already exists 2026-03-17 17:05:52 +08:00
Dionisio Pozo 775abab8e1 Merge pull request #224 from BillionClaw/clawoss/fix/file-move-folder-ownership
fix(file): verify target folder ownership on move
2026-03-17 09:57:28 +01:00
BillionClaw 30d6e53fca fix(file): verify target folder ownership on move
When moving a file to a folder, verify that the caller owns the target
folder. Without this check, a file could be moved to another user's
folder, causing the file to "disappear" from the original user's view
since file listings filter by user_id.

- Add folder_repo to FileManagementService
- Add verify_target_folder_owner() method
- Call it in move_file_owned() before moving
2026-03-17 16:53:55 +08:00
Dionisio Pozo 79902bf727 Merge pull request #223 from BillionClaw/clawoss/fix/shared-link-404
fix(share): correct shared link URL to include /api prefix
2026-03-17 09:50:15 +01:00
Dionisio Pozo 41a3a1ce5e Merge pull request #222 from BillionClaw/clawoss/fix/webdav-rename-status-code
fix(webdav): preserve correct status codes for file rename/move failures
2026-03-17 09:49:34 +01:00
BillionClaw 852db02cd0 fix(share): correct shared link URL to include /api prefix
The shared link URL was generated as {base_url}/s/{token} but the
API endpoint is actually at /api/s/{token}. This caused 404 errors
when users accessed shared links.

Fixes #101
2026-03-17 16:48:11 +08:00
BillionClaw 3c48aa1e6f fix(webdav): preserve correct status codes for file rename/move failures
When file or folder rename/move operations failed in WebDAV handlers,
all errors were incorrectly converted to HTTP 500 Internal Server Error
using AppError::internal_error(). This masked specific error types:

- AlreadyExists errors should return 409 CONFLICT
- NotFound errors should return 404 NOT FOUND
- AccessDenied errors should return 403 FORBIDDEN

Changed error handling to use AppError::from() which preserves the
original DomainError type and maps to appropriate HTTP status codes.

Fixes handling of incorrect status code for file rename failure.
2026-03-17 16:29:21 +08:00
Dionisio Pozo d1699357d8 Merge pull request #221 from BillionClaw/clawoss/fix/trash-view-rendering
fix(trash): add missing display fields to TrashedItemDto
2026-03-17 09:12:28 +01:00
BillionClaw 32c5630a5f fix(trash): add missing display fields to TrashedItemDto
Add category, icon_class, and icon_special_class fields to TrashedItemDto
to fix trash view rendering issues. The frontend expects these fields to
properly display file type information, icons, and deletion dates.

- category: Human-readable file category (e.g., "Image", "Document")
- icon_class: FontAwesome icon class for the file type
- icon_special_class: Special CSS class for icon styling

Fixes #107
2026-03-17 16:08:12 +08:00
Dionisio Pozo 1b91c0e285 Merge pull request #220 from BillionClaw/clawoss/fix/webdav-storage-quota-104
fix(webdav): enforce storage quota on WebDAV PUT uploads
2026-03-17 09:06:11 +01:00
BillionClaw ec09136836 fix(webdav): enforce storage quota on WebDAV PUT uploads
Adds storage quota checking to the WebDAV PUT handler, which was missing
while present in other upload handlers (regular upload and chunked upload).

The quota check happens after the file is spooled to a temp file (so we
know the exact size) but before it's moved to permanent storage. If the
quota is exceeded, the temp file is cleaned up and a 507 Insufficient
Storage error is returned.

Fixes #104
2026-03-17 16:04:20 +08:00
Dionisio Pozo d75917433f Merge pull request #219 from BillionClaw/fix/size-column-alignment
fix(css): align size values in table view
2026-03-17 08:58:01 +01:00
BillionClaw b363ca3a88 fix(css): align size values in table view using tabular-nums
Adds font-variant-numeric: tabular-nums to size-cell class to ensure
file size values align properly in the list view. Numeric characters
now use equal-width glyphs, preventing misalignment of values like
"1 B", "2.5 KB", and "100 MB".

Fixes #101
2026-03-17 15:55:48 +08:00
Dionisio Pozo 5279e0c266 Merge pull request #218 from BillionClaw/clawoss/fix/dark-mode-and-search 2026-03-17 07:59:02 +01:00
Dionisio Pozo b2b37d763f Merge pull request #217 from BillionClaw/fix/upload-notification-i18n 2026-03-17 07:58:21 +01:00
BillionClaw 91e907bef6 fix(ui): resolve dark mode toggle and file search errors
- Fix dark mode toggle not responding by deriving theme state from
  localStorage instead of UI pill state. Added syncThemePill() to ensure
  UI and document theme stay synchronized.

- Fix file search error when folder_id is empty by validating the
  currentPath before setting it in search options. Empty folder_id
  now correctly triggers global search instead of causing a backend
  error with invalid UUID.

Fixes #102
2026-03-17 14:19:09 +08:00
BillionClaw 0c812d9390 fix(i18n): use translation keys for upload notification titles
Replace hardcoded English/Spanish strings with proper i18n translations
for upload notification titles and file count labels.

- Add upload.files translation key to all locale files
- Update notifications.js to use window.i18n.t() for:
  - upload.uploading title
  - upload.files file count label
  - upload.complete completion message

Fixes #108
2026-03-17 14:17:39 +08:00
Dionisio Pozo b7e3fb13f5 Merge pull request #216 from BillionClaw/clawoss/fix/batch-folder-deletion 2026-03-17 04:34:21 +01:00
Dionisio Pozo f2ad601a75 Merge pull request #215 from BillionClaw/clawoss/fix/i18n-share-folder-translation 2026-03-17 04:33:30 +01:00
Dionisio Pozo 07bc7e564d Merge pull request #214 from BillionClaw/clawoss/fix/docker-publish-postgres 2026-03-17 04:32:42 +01:00
BillionClaw 665220dd0b fix(files): batch folder deletion fails
Add debug logging to diagnose batch trash failures for folders.
When batch trash operations fail, the specific error was not being
logged, making it difficult to diagnose issues like #124.

- Add tracing::debug! logs for failed file and folder trash operations
  in batch_operations.rs
- Add unit tests for batch operation result handling to verify
  correct success/failure counting

Fixes #124
2026-03-17 11:21:16 +08:00
BillionClaw 2288daedec fix(i18n): add missing dialogs.share_folder translation key
The share dialog for folders was failing because dialogs.share_folder
key was missing from all locale files. The contextMenus.js code
references this key when opening the share dialog for folders:

  window.i18n.t('dialogs.share_folder')

Added the missing key to all 14 locale files with appropriate
translations for each language.

Fixes #189
2026-03-17 10:51:10 +08:00
BillionClaw 3569c5fa5a fix(ci): add PostgreSQL service to Docker publish workflow
The Docker Hub Release workflow's test job was missing the PostgreSQL
service required by the test suite. This caused the workflow to fail
before building and pushing the Docker image, resulting in missing
container images (e.g., v0.5.2).

Add the PostgreSQL service configuration matching ci.yml:
- PostgreSQL 16-alpine service container
- Health check configuration
- DATABASE_URL environment variable
- Database initialization step

Fixes #193
2026-03-17 10:49:02 +08:00
Dionisio Pozo f6a2985dbc Merge pull request #213 from BillionClaw/clawoss/docs/fix-incorrect-branch-path 2026-03-17 02:16:01 +01:00
BillionClaw 282626cce7 docs: fix incorrect path in development guide 2026-03-17 08:19:13 +08:00
Dionisio Pozo 0e8f910904 Merge pull request #212 from BillionClaw/clawoss/fix/menu-navigation 2026-03-16 23:47:22 +01:00
BillionClaw 0a6d733be5 fix(ui): resolve broken menu navigation
The sidebar CSS had incorrect :nth-child() selectors for nav item colors.
When the Photos menu item was added, the CSS wasn't updated to account
for the new 6th position of the Trash item.

Changes:
- Add color styling for Photos nav item (5th child, pink)
- Update Trash nav item to use :nth-child(6) instead of :nth-child(5)
- Add active state colors for both Photos and updated Trash positions

Fixes #194
2026-03-17 06:25:35 +08:00
Dionisio Pozo 9565f25dc2 Merge pull request #211 from BillionClaw/clawoss/fix/csp-session-loop
fix(auth): resolve CSP blocking inline styles and fix session refresh loop
2026-03-16 23:17:19 +01:00
BillionClaw 2daee68d20 fix(auth): resolve CSP blocking and session refresh loop
Fix two issues causing login loop after successful admin setup:

1. CSP blocking inline styles: The frontend JavaScript dynamically sets
   inline styles (e.g., element.style.display = 'none') for UI state
   management. The CSP header only allowed 'self' for style-src, blocking
   these dynamic styles. Added 'unsafe-inline' to style-src directive.

2. Session refresh 401 errors: The cookie Secure flag defaulted to true
   when OXICLOUD_BASE_URL was not set, causing cookies to not be sent
   over HTTP in Docker deployments. Changed the default to false when
   the base URL is not explicitly set to HTTPS, with clear logging to
   guide users to set OXICLOUD_COOKIE_SECURE=true for production.

Fixes #203
2026-03-17 06:14:02 +08:00
Dionisio Pozo c669c24036 Merge pull request #210 from BillionClaw/clawoss/docs/feature-status-table 2026-03-16 22:59:36 +01:00
BillionClaw 2d4fa1e17f docs(readme): add feature status table 2026-03-17 05:47:09 +08:00
Dionisio Pozo 907ffaa0a3 Merge pull request #209 from BillionClaw/clawoss/fix/armv7-overflow 2026-03-16 21:55:57 +01:00
BillionClaw 0cbbb6b7ac fix: ARMv7 32-bit compilation overflow
The constant 10 * 1024 * 1024 * 1024 (10 GB) overflows on 32-bit systems
where usize is 32-bit (max ~4GB). This caused compilation failures on
ARMv7 architecture.

Fix by using architecture-appropriate limits:
- 64-bit: 10 GB (unchanged)
- 32-bit: 1 GB (safe maximum for 32-bit usize)

Fixes #206
2026-03-17 04:39:18 +08:00
Dionisio Pozo c9ca1f8885 Merge pull request #208 from BillionClaw/clawoss/fix/calendar-owner-id-uuid-type 2026-03-16 20:18:47 +01:00
BillionClaw 7645792d5a fix(calendar): change owner_id from String to Uuid type
The database schema defines owner_id as UUID, but the Calendar entity
stored it as String. This caused a type mismatch error when creating
calendars via CalDAV clients like DAVx:

  column "owner_id" is of type uuid but expression is of type text

Changes:
- Change Calendar.owner_id from String to Uuid
- Update new() and with_id() to accept Uuid
- Update owner_id() getter to return &Uuid
- Update belongs_to() to accept &Uuid
- Update calendar_storage_adapter to pass Uuid directly
- Update tests to use Uuid::new_v4()

Fixes #200
2026-03-17 02:58:34 +08:00
Dionisio Pozo 036a345b4e Merge pull request #207 from jaredwolff/fix/nextcloud-sync-conflict
Fix Nextcloud sync conflict caused by static UUID ETags
2026-03-15 20:28:39 +01:00
Jared Wolff b6bcb7d366 Fix RUSTSEC-2026-0037: update quinn-proto to 0.11.14
Patch denial-of-service vulnerability where invalid QUIC transport
parameters could cause a panic in quinn-proto.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 14:42:34 -04:00
Jared Wolff 1fcd02a519 Fix Nextcloud sync conflict by using content-hash ETags
The Nextcloud Android client compares ETags before and after upload to
verify its write landed. OxiCloud was returning the stable file UUID as
the ETag, which never changed on content updates, causing false
SYNC_CONFLICT errors on every upload.

Five fixes applied:
1. Thread blob_hash (SHA-256) through File entity, FileDto, all read/write
   queries, and all WebDAV/PROPFIND responses as the ETag — changes on
   every content update, no DB migration needed.
2. Honor X-OC-Mtime header: parse the client-supplied mtime and use it
   for updated_at via COALESCE(to_timestamp($n), NOW()).
3. Disable phantom checksum capability (preferredUploadType/supportedTypes)
   that the server never actually implemented, stopping retry loops.
4. Add nc:creation_time and nc:upload_time to PROPFIND responses.
5. Return oc-etag header in chunked upload MOVE (assemble) responses.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 14:14:24 -04:00
Dionisio Pozo 5fb3e31ad7 Merge pull request #202 from JVMerkle/bugfix/cal-color-validation 2026-03-14 16:35:57 +01:00
Julian Merkle 85663ef050 calendar.rs: Allow RGBA colors
The android app "DAVx" creates calendars with RGBA color codes.

fixes #199
2026-03-14 15:48:11 +01:00
Dionisio Pozo 04be94026e Merge pull request #198 from nk-designz/helm-chart 2026-03-12 17:20:02 +01:00
Nico Kahlert 080b87a277 Add documentation for the helm chart 2026-03-12 13:07:19 +01:00
Nico Kahlert a166bd4a99 Created a helm chart for oxicloud with optional wopi 2026-03-12 12:48:22 +01:00
Dionisio Pozo f2cf6e0193 Merge pull request #197 from raenur/documentation-suggestions
Documentation suggestions for accessing oxicloud remotely after first install
2026-03-11 10:37:38 +01:00
Nathan Shepperd 017e82aca0 Update README.md 2026-03-11 08:48:14 +00:00
Nathan Shepperd 769c95fac9 Update example.env
Note in example.env file about accessing remotely via the server's domain name
2026-03-11 08:46:12 +00:00
Dionisio Pozo 5b7ca30060 Merge pull request #195 from jaredwolff/fix/migration-media-sort-date
fix(migrations): handle pre-existing tables missing media_sort_date
2026-03-11 08:38:53 +01:00
Dionisio Pozo f737dc09ce Merge pull request #196 from jaredwolff/fix/ui-fixes
fix(ui): photos view bleeding into trash view
2026-03-11 08:38:03 +01:00
Jared Wolff a0ee538cb7 fix(docker): remove target-cpu=native from Dockerfile
target-cpu=native causes SIGILL in CI because the build script is
compiled with CPU-specific instructions that the Docker builder
doesn't support. Docker images should use generic CPU targets for
portability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 21:24:49 -04:00
Jared Wolff 9fbc6bf2a4 fix(ui): photos view bleeding into trash view
The trash nav handler manually set view flags instead of calling
setCurrentSection('trash'), which meant the photos container was
never hidden when switching to trash. Use the central view-switching
function so all other views (photos, shared) are properly cleaned up.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 21:22:53 -04:00