102 Commits

Author SHA1 Message Date
Eugene Burmakin 185d729e60 chore: strip explanatory comments from security-fix files
Audit-finding rationale lives in commit messages and the audit report,
not in the code. url_validatable.rb keeps its docstring because the
two-tier blocklist + DNS-rebinding caveats are subtle enough that a
reader benefits from the explanation right next to the code.
2026-05-02 12:38:55 +02:00
Eugene Burmakin 8bba38a072 security: prevent path traversal in user-data archive import (audit C-2)
Pathname#join does not normalize `..` segments, and an absolute-path
argument silently overrides the base. The user-data archive import
flow read attacker-controlled `file_name` and manifest `files` paths
directly into `files_directory.join(...)` and
`import_directory.join(...)`, then attached the resulting file to an
Import / Export / RawDataArchive record the attacker could download.

Any authenticated user reaching POST /settings/users/import could read
any file the Rails process can read (env vars, master.key, AWS creds
on cloud) and exfiltrate it via the imports index download link.

Adds Users::ImportData::PathSafety with two helpers:
- safe_basename_path strips path components for `files/` lookups
- safe_relative_path enforces base-dir containment for nested manifest paths

Updated callers:
- Users::ImportData::Imports#restore_import_file
- Users::ImportData::Exports#restore_export_file
- Users::ImportData::RawDataArchives#restore_archive_file
- Users::ImportData::V2Handler#safe_manifest_path used by all manifest-driven readers
2026-05-02 11:27:28 +02:00
Eugene Burmakin 7e8d97dcda Rework account deletion flow for self hosters 2026-04-28 22:49:08 +02:00
Eugene Burmakin a7bd7e667a Improve security 2026-04-28 22:23:48 +02:00
Eugene Burmakin ade8f155bc Fix found issues and improve test coverage 2026-04-26 23:41:36 +02:00
Eugene Burmakin 593683a986 Fix found issues and extract svgs to files 2026-04-26 21:19:07 +02:00
Eugene Burmakin b2dbd5d951 Fix altitude stuff 2026-04-26 20:51:52 +02:00
Eugene Burmakin 8e9923b60e Implement GPS noise filtering settings 2026-04-26 20:31:14 +02:00
Eugene Burmakin 326873fb51 Fix found issues 2026-04-22 20:26:23 +02:00
Eugene Burmakin 191d2ff4bd Implement monthly digest emails and split yearly digest into a separate email 2026-04-22 19:49:05 +02:00
Evgenii Burmakin 860291a739 Merge branch 'dev' into feat/gps-noise-filtering 2026-03-26 20:59:57 +01:00
Eugene Burmakin b323228213 Fix multiple issues 2026-03-26 20:36:02 +01:00
Eugene Burmakin 95ea3ed962 Implement GPS noise filtering and support for Android web view sign-in 2026-03-25 20:50:52 +01:00
Eugene Burmakin 49db5e4e82 Implement family location history viewing along with some fixes 2026-03-13 23:19:52 +01:00
Eugene Burmakin 9e2ceb3c8c Update user management 2026-03-12 21:08:07 +01:00
Eugene Burmakin bedecf8d28 Fix inconsistensies 2026-03-02 21:43:36 +01:00
Eugene Burmakin 36c0b48984 Move gating to backend 2026-03-02 21:36:46 +01:00
Eugene Burmakin bad614d3be Refactor finding a user in jobs 2026-02-27 20:36:08 +01:00
Eugene Burmakin ae9bef4771 Set default scope for user model 2026-02-27 18:44:45 +01:00
Eugene Burmakin 737ba14929 Fix linters 2026-02-26 19:42:54 +01:00
Eugene Burmakin 6b388a23bb Fix minor issues 2026-02-26 19:08:17 +01:00
Eugene Burmakin fd4648b51f Remove duplication of a deleted user validation scope and rename to deleted for clarity 2026-02-26 17:32:31 +01:00
Eugene Burmakin d0568f56a7 Update user dependent relations to handle soft-deleted users 2026-02-26 17:03:03 +01:00
Evgenii Burmakin b135ee7cd4 Merge branch 'dev' into feature/async-user-deletion 2026-02-26 00:02:02 +01:00
Eugene Burmakin 246499b476 Fix rubocop and biome linting issues 2026-02-24 21:59:40 +01:00
Eugene Burmakin d175307ce0 Reduce number of calculatuons during data export 2026-02-23 18:37:57 +01:00
Eugene Burmakin cf95846a0b Fix closing files 2026-02-22 21:31:30 +01:00
Eugene Burmakin a880f256de Fix linters issues 2026-02-22 12:59:53 +01:00
Eugene Burmakin 8bb4ab099c Rework user data import-export and replace some js with turbo/stimulus 2026-02-22 10:40:43 +01:00
Eugene Burmakin 4df4255623 Introduce a proper timeline 2026-02-17 21:57:11 +01:00
Eugene Burmakin 36f8d131a0 Use fixed user timezone to prevent timezone change during a job execution. 2026-02-16 22:33:06 +01:00
Eugene Burmakin 91cf3e1e8d Introduce timezone setting for users 2026-02-16 01:16:56 +01:00
Eugene Burmakin 59c3a45567 Fix rubocop issues 2026-02-15 23:29:38 +01:00
Eugene Burmakin 7a4b07149b Fix rubocop issues, update app version and changelog for v1.2.0 release 2026-02-15 23:24:17 +01:00
Eugene Burmakin b96653dcd4 Address rubocop issues 2026-02-01 20:38:58 +01:00
Evgenii Burmakin f477fc9eab Rework exports to use streaming serializers for better performance (#2225)
* Rework exports to use streaming serializers for better performance

* Minor changes

* Fix failing specs
2026-02-01 19:59:26 +01:00
Eugene Burmakin ef39e28e5b Resolve multiple issues 2026-02-01 18:17:55 +01:00
Eugene Burmakin f5e2924127 Fix SSL warning and remember family/places layers 2026-02-01 15:51:25 +01:00
Evgenii Burmakin 01429be24a Supporter verification (#2199)
* Update

* Implement supporter verification feature

* Cache supporter verification results to improve performance

* Remove initializer

* Update verify service

* Add supporter badge

* Move verification form

* Move settings update logic to a service object and adjust routes and views accordingly.

* Disable caching for supporter verification

* Reintroduce caching for supporter verification results
2026-01-31 16:09:21 +01:00
Eugene Burmakin bb1d5f1b15 Fix failing specs 2026-01-26 00:43:01 +01:00
Eugene Burmakin 9b4599079b Use user defined transportation thresholds in transportation mode detection and classification. 2026-01-25 23:33:47 +01:00
Evgenii Burmakin cd3dba9f0c Feature/insights page (#2179)
* Update stuff

* Extract insights controller logic to services

* Fix failing specs

* Refactorings

* Add indicies with if_not_exists to migrations

* Recalculate tracks transportation modes upon settings change

* Block transportation modes settings form while a recalculation is in progress.

* Add top visited locations

* Bit of a refactoring

* Update navbar

* Add activity heatmap feature and update insights header

* Add activity streak to insights page and changelog

* Add caching for insights page

* Preheat cache for insights

* Move digest cache preheating to a service
2026-01-25 23:01:48 +01:00
Evgenii Burmakin 0edaa7e55b Address number of photos related issues (#2152)
* Address number of photos related issues

* Fix minor stuff

* Update integrations page layout
2026-01-14 00:19:47 +01:00
Evgenii Burmakin 096a7a6ffa Support properties->date field for timestamp in GeoJSON imports (#2159)
* Support properties->date field for timestamp in GeoJSON imports

* Fix GeoJSON date parsing
2026-01-14 00:17:27 +01:00
Eugene Burmakin d5ed8bf943 Add missing tests 2026-01-10 12:16:47 +01:00
Eugene Burmakin 8465350c1b Rework some parts 2026-01-08 21:12:47 +01:00
Eugene Burmakin 17837979e2 Move user deletions to background job 2026-01-08 20:29:28 +01:00
Eugene Burmakin 03069caa48 Stats are now calculated with more accuracy by storing total minutes spent per country. 2026-01-04 19:46:15 +01:00
Eugene Burmakin 6f8bdce9f4 Update time spent calculation for country minutes in user digests 2026-01-04 19:19:38 +01:00
Eugene Burmakin fc2707a609 Implement globe projection option for Map v2 using MapLibre GL JS. 2026-01-04 18:44:25 +01:00