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
- 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
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
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
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
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
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
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
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
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>
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>
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>
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>
When the storage.files table already exists from a manual migration,
CREATE TABLE IF NOT EXISTS is skipped entirely, so the new
media_sort_date column is never added. Add an ALTER TABLE ADD COLUMN
IF NOT EXISTS immediately after the CREATE TABLE to handle both fresh
and pre-existing databases.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CI and Docker builds broke after removing db/ in favor of migrations/.
- ci.yml: point psql init at migrations/20260307000000_initial_schema.sql
- Dockerfile: COPY migrations instead of db; remove unused db copy in final stage
- docker-build.yml: remove db/schema.sql presence check
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add pre-commit section: cargo fmt then cargo clippy before committing
- Update db/schema.sql references to migrations/ (sqlx migrations)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace manual schema.sql application with sqlx's built-in migration
system. Migrations are embedded at compile time and tracked in the
_sqlx_migrations table. Pending migrations run automatically on startup.
- Move db/schema.sql → migrations/20260307000000_initial_schema.sql
- Remove apply_schema() and split_sql_statements() from db.rs
- Add run_migrations() using sqlx::migrate!() macro
- Remove docker-compose schema.sql mount (app handles it now)
- Enable sqlx "migrate" feature in Cargo.toml
Future schema changes: add a new timestamped .sql in migrations/.
Closes#190
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix all clippy lints (collapsible if, clone on Copy, needless borrow,
redundant bindings, unused params) and apply rustfmt across the codebase.
Update test mocks to match Uuid-based trait signatures.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>