Commit Graph

20 Commits

Author SHA1 Message Date
google-labs-jules[bot] d22175310a 🛡️ Sentinel: [HIGH] Fix Server-Side Request Forgery in IMAP connections
🚨 Severity: HIGH
💡 Vulnerability: User-provided IMAP `host` in `_test_imap_connection` and `pull_inbox` was not validated against private IPs, creating an SSRF risk.
🎯 Impact: Attackers could abuse the endpoints to port-scan or interact with internal/private network services.
🔧 Fix: Integrated `is_private_ip` from `app.utils.network` to block connections resolving to private, loopback, link-local, or reserved IPs.
 Verification: Ran `test_imap_tasks.py` and `test_api_imap_accounts.py` successfully. Checked `ruff` output and diffs. Removed all scratch files from the commit.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-23 14:45:22 +00:00
copilot-swe-agent[bot] 3b5ca04ebc fix(mobile): wire i18n reactivity, translate all screens, sync language with server
- Add LocaleProvider + useLocale() hook with AsyncStorage persistence to mobile i18n
- Replace all hardcoded English strings in every screen with t() calls
- Add missing profile.settings/language keys to all 5 translation files (en/de/es/fr/it)
- Wrap app root in LocaleProvider; apply server preferred_language on login in AuthGuard
- Tab labels and header titles now re-render on language switch
- ProfileScreen: use useLocale() context, sync language to server via POST /api/i18n/language
- Backend: add preferred_language field to GET /api/mobile/whoami response
- Mobile API: add preferred_language to WhoAmIResponse type + setServerLanguage() method
- Tests: add test_whoami_returns_preferred_language and test_whoami_no_profile_preferred_language_is_null
- Docs: update MobileApp.md with language sync priority and whoami response format

Language priority: server preference > AsyncStorage > device locale > English fallback

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-20 09:08:08 +00:00
copilot-swe-agent[bot] 67c17e7baa feat(mobile): add pre-login legal pages, multi-image selection, file detail view, search, i18n, HEIC support
- Add Privacy Policy, Terms of Service, and Imprint links to WelcomeScreen
  and LoginScreen for GDPR/Apple compliance (pre-login access)
- Enable multiple image selection in photo library picker
- Add HEIC/HEIF image support to backend (allowed_types, convert_to_pdf, upload handler)
- Create FileDetailScreen with processing status and logs
- Add search bar to FilesScreen with debounced search
- Set up i18n with expo-localization (EN, DE, ES, FR, IT)
- Add language selector to ProfileScreen settings
- Add Imprint link to ProfileScreen legal section
- Update docs and tests

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-19 19:11:44 +00:00
copilot-swe-agent[bot] f549505bfd fix(mobile): fix shared file upload hanging by copying to cache
Files shared via iOS Share Sheet / "Open In…" may reference paths
outside the app's sandbox or use security-scoped URLs that React
Native's fetch cannot read. This caused uploads to hang indefinitely
with a spinning indicator.

Fixes:
- Set LSSupportsOpeningDocumentsInPlace to false so iOS copies shared
  files to the app's accessible Inbox directory
- Use expo-file-system to copy external file:// URIs to the app's
  cache directory before uploading (ensureLocalUri helper)
- Apply ensureLocalUri to both initial uploads and retries

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-19 12:03:12 +00:00
copilot-swe-agent[bot] 1572f322d7 docs: add Apple App Store Compliance audit report
Create comprehensive audit document covering HIG compliance,
privacy manifest, permissions, background modes, account
deletion, and all App Store Review Guidelines areas.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-19 11:45:58 +00:00
copilot-swe-agent[bot] 71a7a57adc fix(mobile): add shared file to ShareContext directly in +not-found.tsx
When iOS delivers a file via "Open In…", expo-router strips the
docuelevate:// scheme and routes to +not-found.tsx. Previously, this
screen only redirected to the Upload tab and relied on the Linking
handler in _layout.tsx to add the file to ShareContext. This was
unreliable because expo-router may consume the URL event before the
Linking handler fires.

Now +not-found.tsx directly reconstructs the file:// URI from the
pathname and adds it to ShareContext before redirecting. ShareContext
deduplicates by URI to prevent double uploads if both mechanisms fire.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-19 11:12:34 +00:00
copilot-swe-agent[bot] f2b7db88ba fix(mobile): resolve iOS "unmatched route docuelevate://" error in Open In share flow
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-18 23:27:56 +00:00
copilot-swe-agent[bot] 723b14e660 docs: update QR code login documentation with scanner and TTL details
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-17 12:04:53 +00:00
copilot-swe-agent[bot] 1350aa6a5e fix(mobile): add root index.tsx redirect to prevent stale Hello World screen
Without a root app/index.tsx in the repo, a stale default Expo Router
scaffold file (showing "Hello World") could be picked up from a previous
build or CLI scaffolding and displayed instead of the real app.

The new index.tsx immediately redirects to /(auth)/, and the existing
AuthGuard in _layout.tsx forwards authenticated users to /(tabs)/.

Also registers the index screen in the root Stack and updates
docs/MobileApp.md with an expanded project structure and a new
troubleshooting entry.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-16 23:01:43 +00:00
copilot-swe-agent[bot] d322ec6dc7 feat(mobile): add retry for failed uploads via tap and long-press
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-16 20:35:13 +00:00
copilot-swe-agent[bot] acfba4b58c fix(mobile): handle iOS share sheet custom scheme URLs and add photo library picker
On iOS the Share Sheet / "Open In" action may deliver the file path
under the app's custom docuelevate:// scheme instead of a file:// URL,
causing an "Unmatched Route" error.  The URL handler now detects this
and rewrites the URL to file:// before processing.

Also adds a Photo Library button to the Upload screen so users can
select existing photos from their device library, not just capture
new ones with the camera.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-16 17:25:03 +00:00
copilot-swe-agent[bot] 4c8926a1fa fix(mobile): switch to remote appVersionSource for auto-incrementing build numbers
Change `appVersionSource` from `"local"` to `"remote"` in `eas.json` so EAS
tracks build numbers on its servers. This ensures every CI build gets a
unique, ever-increasing version without needing to commit bumps back to
the repo — fixing the App Store Connect "bundle version already used"
rejection.

Also bump `ios.buildNumber` to "7" and `android.versionCode` to 7 in
`app.json` (above the previously uploaded version "6") so the remote
version initializes correctly.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-16 16:57:52 +00:00
Christian Krakau-Louis 6d48976bc5 Merge pull request #739 from christianlouis/copilot/optimize-mobile-build-trigger
ci(mobile): add path filter and auto-submit to Apple for EAS workflow
2026-03-16 17:07:10 +01:00
copilot-swe-agent[bot] bebeab3191 ci(mobile): add path filter and auto-submit to Apple for EAS workflow
- Add paths filter so builds only trigger when mobile/ files change
- Add submit_ios job to automatically submit iOS builds to App Store Connect
- Update docs/MobileApp.md and mobile/README.md with CI/CD documentation

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-16 15:55:36 +00:00
copilot-swe-agent[bot] 4de6b439ce fix(mobile): iOS share sheet, empty files tab, and stuck upload status
- app.json: add CFBundleDocumentTypes to iOS infoPlist so the app
  appears in the iOS Share Sheet; add ACTION_SEND/SEND_MULTIPLE
  intentFilters for Android share intent support

- src/context/ShareContext.tsx (new): React context that queues files
  received from the share sheet and delivers them to UploadScreen

- app/_layout.tsx: wrap in ShareProvider; add Linking handler
  (makeUrlHandler factory + getInitialURL cold-start + addEventListener
  warm-start) to capture file:// and content:// URLs

- src/services/api.ts: fix FileRecord interface (original_filename,
  nested ProcessingStatus, mime_type); fix UploadResponse interface;
  fix listFiles() (per_page param, unwrap data.files); add
  getFileStatus(fileId) for single-file status polling

- src/screens/FilesScreen.tsx: use file.original_filename and
  file.processing_status.status; fix statusEmoji to use actual backend
  status values (completed/pending/duplicate)

- src/screens/UploadScreen.tsx: consume ShareContext for auto-upload of
  shared files; add 5-second polling loop (search by filename → file_id
  → getFileStatus) to show real-time server processing status;
  uploadFile wrapped in useCallback; proper effect dependency arrays

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-16 15:52:54 +00:00
copilot-swe-agent[bot] dd02ff5677 fix(mobile): suppress Node.js url.parse() deprecation and document Apple session fix
- Add NODE_NO_WARNINGS=1 to all eas.json build profiles (development,
  preview, production) to suppress [DEP0169] url.parse() deprecation
  warnings emitted by EAS CLI when the build image's system Node is 22+
- Add NODE_NO_WARNINGS=1 env to both EAS Cloud Workflow jobs
  (.eas/workflows/create-builds.yml) with explanatory comments
- Fix outdated Node.js prerequisite in docs/MobileApp.md (was "18 or
  later", now "20.19.4 or later" with nvm guidance)
- Add troubleshooting sections in docs/MobileApp.md and mobile/README.md
  covering both the "Session expired Local session" error (Apple ID
  session expiry + App Store Connect API key recommendation) and the
  [DEP0169] Node.js deprecation warning

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-15 21:06:07 +00:00
copilot-swe-agent[bot] 14285567d5 fix(auth): Expo Go support via Linking.createURL; safe token URL construction; clean up return type annotation
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-15 17:42:36 +00:00
copilot-swe-agent[bot] 5c373e7224 fix(auth): store mobile_redirect_uri in session and redirect to deep-link after SSO; fix SafeAreaView deprecation
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-15 17:35:49 +00:00
copilot-swe-agent[bot] 3372a93f71 fix(mobile): resolve iOS build errors by enabling buildReactNativeFromSource for Expo SDK 54
Expo SDK 54 switched to precompiled React Native XCFrameworks by default
for faster iOS builds. However, the precompiled frameworks do not expose
legacy bridge headers (RCTBridge, RCTViewManager, RCTSurfaceHostingProxyRootView,
RCTPackagerConnection, RCTDevSettings.isDebuggingRemotely, rootViewFactory)
that some native modules (e.g. expo-dev-client) still reference.

Add expo-build-properties (v1.0.10, the SDK 54-compatible version) and
configure buildReactNativeFromSource: true for iOS. This compiles React
Native from source, making all native headers available to linked modules
and resolving the Xcode compilation errors seen in the EAS production build.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-14 22:50:29 +00:00
copilot-swe-agent[bot] d538c0879d feat(mobile): add iOS/Android mobile app with SSO login, camera upload, and push notifications
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-10 09:52:02 +00:00