5873 Commits

Author SHA1 Message Date
Andy Miller
26a2d519c5 update the copyright year
Signed-off-by: Andy Miller <rhuk@mac.com>
2026-04-16 15:52:46 +01:00
Andy Miller
d05a25af40 Grav 2.0 additions
Signed-off-by: Andy Miller <rhuk@mac.com>
2026-04-15 17:21:47 +01:00
Andy Miller
d5caf45792 prepare for beta release
Signed-off-by: Andy Miller <rhuk@mac.com>
2026-04-15 14:03:26 +01:00
Andy Miller
f47feee98d remove safe-upgrade/snapshots/recover
Signed-off-by: Andy Miller <rhuk@mac.com>
2026-04-15 14:03:10 +01:00
Andy Miller
8426e91cac feat: surface remote next_major hint in Upgrader for cross-major migration notices
Reads the new `next_major` block from grav.json (sent by a family-aware
resources server when a 1.x client is served a 1.x release alongside a 2.x
hint) and exposes it via Upgrader::isNextMajorAvailable(),
getNextMajorVersion(), getMigrationUrl(). The admin plugin uses these to
show a dashboard migration banner without implying an automatic upgrade.

isNextMajorAvailable() no longer compares raw remote vs local majors —
under family-aware serving, the remote version is already the client's
family, so the old logic would silently stop firing. It now requires
the server hint and verifies it truly points to a newer major.

Tests updated to inject the hint via an extended TestableUpgrader.
2026-04-13 22:41:39 +01:00
Andy Miller
e83b12d8c4 fix(tests): remove snapshot test and fix CompatibilityTest GRAV_ROOT issue
- Delete InstallSnapshotManifestTest: references isSnapshotManifest()
  which no longer exists after safe-upgrade removal
- Fix InstallCompatibilityTest: GRAV_ROOT is a PHP constant that cannot
  be redefined per-test; add optional $root param to detectIncompatiblePackages,
  isPluginEnabled, and isThemeEnabled so tests can pass a tmpDir directly
2026-04-13 19:23:56 +01:00
Andy Miller
98af1cb4e3 Remove SafeUpgradeService, add family-aware GPM upgrade gate
- Remove SafeUpgradeService, RollbackCommand, SafeUpgradeRunCommand, and bin/restore
- Simplify Install.php: remove all snapshot logic; keep forceSafeUpgrade() as no-op stub
  for backward compat with pre-2.0 upgrade scripts that call it in finally blocks
- Simplify SelfupgradeCommand: remove --safe/--legacy flags, safe-upgrade window tracking,
  and manifest block; keep RecoveryManager plugin-disable calls
- Simplify PreflightCommand: use Install::instance()->generatePreflightReport() directly
- Simplify recovery.php: remove auth, rollback, and quarantine sections; keep
  clear-flag and disable-recovery actions
- Upgrader::isUpgradable() now returns false when remote is a different major.minor family
  (e.g. 1.8.x will not auto-upgrade to 2.0.x)
- Add Upgrader::isNextMajorAvailable() for future informational notices
- Add bin/gpm-cache-inject helper for local E2E testing without a live server
- Add UpgraderFamilyTest covering all cross-family and same-family scenarios (10/10)
2026-04-13 18:45:41 +01:00
Andy Miller
6324cca502 Recognize '2.0' in compatibility inference and CLI badges
Extends the 1.7/1.8 compatibility machinery to treat a grav >= 2.0
dependency as ['2.0']. SelfupgradeCommand's preflight already keys off
the target package's major.minor, so upgrading 1.8 → 2.0 now correctly
flags plugins that only declare 1.7 or 1.8 as blocking.

- GPM/Local/Package::inferCompatibility(): grav >= 2.0 → ['2.0']
- Installer/Install::inferCompatibleVersions(): grav >= 2.0 → ['2.0']
- IndexCommand / InfoCommand / UpdateCommand: magenta '2.0' badge

Ships as part of the final 1.8 beta so the installed base has a clean
upgrade gate when users run `bin/gpm selfupgrade` against a Grav 2.0
release. The actual migration wizard is a 2.0-only deliverable and is
NOT backported here.
2026-04-13 17:04:10 +01:00
Andy Miller
3752a34407 Merge branch '1.8' into 1.8-compatibility 2026-04-13 10:39:51 +01:00
Andy Miller
9aa82d9b0a fix default order
Signed-off-by: Andy Miller <rhuk@mac.com>
2026-04-13 10:35:31 +01:00
Andy Miller
2c517b012e Add compatibility: blueprint support for major version upgrade gating
Adds a new `compatibility:` field to plugin/theme blueprints.yaml that allows
authors to declare which Grav versions they've tested on:

  compatibility:
    grav: ['1.7', '1.8']
    api: ['1.0']

When absent, compatibility is inferred from dependencies (grav >=1.8 means
1.8-only, otherwise assumes 1.7). This gates major upgrades (1.7→1.8) by
blocking if enabled plugins aren't marked as 1.8-compatible.

Core changes:
- Install.php: detectIncompatiblePackages() in preflight checks
- SafeUpgradeService: same detection for admin pre-download checks
- SelfupgradeCommand: interactive handling (disable/continue/abort)
- GPM Local/Package: computed compatibility property from blueprints
- CLI badges: IndexCommand, InfoCommand, UpdateCommand show 1.7/1.8 badges

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 10:22:56 -06:00
Andy Miller
00017266df Add media:// stream for site-level media directory
Registers a new media:// stream pointing to user://media, providing
a dedicated writable stream for site-wide media files not tied to
specific pages. Supports all file types (not just images like the
existing image:// stream).
2026-04-01 15:24:29 -06:00
Andy Miller
e3ff054db2 Move media config blueprint and translations from admin plugin to core
- Replace empty media.yaml blueprint stub with full form fields
- Add PLUGIN_ADMIN media translation keys (MEDIA, MEDIA_TYPES, FILE_EXTENSION,
  TYPE, THUMB, MIME_TYPE, IMAGE_OPTIONS) to all 44 core language files
- Enables media configuration without the admin plugin being enabled

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 16:41:27 -06:00
Andy Miller
cbb936d840 remove this lang-uri fix.. put in custom code for now
Signed-off-by: Andy Miller <rhuk@mac.com>
2026-03-30 06:27:57 -06:00
Andy Miller
c11d2bd867 fix: respect schedule flag in backup profiles
The `schedule` field in backup profile configuration was never checked
when registering backup jobs with the scheduler. This meant backups
would always run on schedule even when `schedule: false` was set.

Fixes #4039
2026-03-17 15:14:04 -06:00
Andy Miller
2fe9a94430 use lang query to change to default lang
Signed-off-by: Andy Miller <rhuk@mac.com>
2026-03-12 15:35:53 -06:00
Andy Miller
dec789fcbf fix for trying to load default lang w/session store
Signed-off-by: Andy Miller <rhuk@mac.com>
2026-03-12 14:46:56 -06:00
Andy Miller
5802a28e5f added new onFlexDirectoryConfigBeforeSave event
Signed-off-by: Andy Miller <rhuk@mac.com>
2026-03-11 10:18:52 -06:00
Andy Miller
8d0b049993 safe upgrade hardening
Signed-off-by: Andy Miller <rhuk@mac.com>
2026-02-25 13:28:09 -07:00
Andy Miller
c4e73d3827 Merge release/1.8.0 fixes: YamlUpdater undefine, upgrade resilience, PHP 8.3 guard, standalone upgrade script
- Fix YamlUpdater.undefine() to actually remove lines from YAML files
- Add maintenance mode (503) during core upgrades via .upgrading flag
- Add opcache_reset in sophisticatedInstall() for reliable file operations
- Add early PHP 8.3 version check in bin/grav
- Add PHP CLI vs web version mismatch hint in Install error messages
- Update 1.7 bridge version references from 1.7.50 to 1.7.51
- Disable recovery_mode by default until stability confirmed
- Add standalone upgrade.php script (CLI + web)
- Update markdowndocs to ^3.0
2026-02-24 21:54:07 -07:00
Andy Miller
7818f601ea support version ie, typhoon:2.4.8
Signed-off-by: Andy Miller <rhuk@mac.com>
2026-02-24 14:03:57 -07:00
Andy Miller
44d26ef7e8 fixes for modern scheduler
Signed-off-by: Andy Miller <rhuk@mac.com>
2026-02-22 23:25:36 -05:00
Xoriander
420a99f6f8 Fix for undefined array key path triggered through url encoded characters (#4012) 2026-02-10 15:18:49 -07:00
Xoriander
5404c3d2a5 More readability for the LogViewerCommand time output (#4009) 2026-02-10 15:18:49 -07:00
Xoriander
619dfa26a4 Fix for wrong LogViewer date output (#4007) 2026-02-10 15:18:49 -07:00
Andy Miller
c191b0b47e impoved yaml linter to be more use built-in grav for more detail
Signed-off-by: Andy Miller <rhuk@mac.com>
2026-02-05 12:16:42 -07:00
Andy Miller
b85e87ae3f Added -v for YamlLinter
Signed-off-by: Andy Miller <rhuk@mac.com>
2026-02-04 12:33:32 -07:00
Andy Miller
607ef2797c cache-cleanup command
Signed-off-by: Andy Miller <rhuk@mac.com>
2026-01-30 09:48:38 -07:00
Andy Miller
07de0cb4e6 prepare for beta release
Signed-off-by: Andy Miller <rhuk@mac.com>
2025-12-27 19:52:39 -07:00
Andy Miller
007b168ad9 don’t do internal gzip, rely on webserver
Signed-off-by: Andy Miller <rhuk@mac.com>
2025-12-25 21:41:20 -07:00
Andy Miller
952830b529 fix gzip encoding issue with newer PHP 8 versions
Signed-off-by: Andy Miller <rhuk@mac.com>
2025-12-25 21:17:22 -07:00
Andy Miller
853ccb6464 fix for broken symlinks
Signed-off-by: Andy Miller <rhuk@mac.com>
2025-12-25 16:32:20 -07:00
Andy Miller
0e4f37eca7 fix of setEscaper move in Twig 3.9+
Signed-off-by: Andy Miller <rhuk@mac.com>
2025-12-22 21:43:10 -07:00
Andy Miller
6b54b32140 fix for user editing causing hashed_password to be removed
Signed-off-by: Andy Miller <rhuk@mac.com>
2025-12-17 14:36:53 -07:00
Andy Miller
368982cb46 fix for nested config changes
Signed-off-by: Andy Miller <rhuk@mac.com>
2025-12-17 12:06:59 -07:00
Andy Miller
b086561160 fix for unusual format SVGs
Signed-off-by: Andy Miller <rhuk@mac.com>
2025-12-15 15:08:15 -07:00
Andy Miller
15cb068f95 fix for grav not picking up config + page changes
Signed-off-by: Andy Miller <rhuk@mac.com>
2025-12-12 16:29:43 -07:00
Andy Miller
d34213232b avoid mail in twig content trigger security error
Signed-off-by: Andy Miller <rhuk@mac.com>
2025-12-12 16:20:35 -07:00
Andy Miller
7a6b8a90d4 prepare for beta release
Signed-off-by: Andy Miller <rhuk@mac.com>
2025-12-08 20:46:53 -07:00
Andy Miller
306f33f4ae fixes for twig3 loader + improve recovery mode
Signed-off-by: Andy Miller <rhuk@mac.com>
2025-12-08 18:07:32 -07:00
Andy Miller
6cb8229806 fix for missing file
Signed-off-by: Andy Miller <rhuk@mac.com>
2025-12-08 10:58:46 -07:00
Andy Miller
80410dae13 opcache fix in CompiledFile
Signed-off-by: Andy Miller <rhuk@mac.com>
2025-12-05 20:59:46 -07:00
Andy Miller
fae70e5fc9 fixes #4002 - Backups blocking /var/www
Signed-off-by: Andy Miller <rhuk@mac.com>
2025-12-03 19:30:32 -07:00
Andy Miller
9d9247a32f fix false positives in Security with on_events
Signed-off-by: Andy Miller <rhuk@mac.com>
2025-12-03 14:17:17 -07:00
Andy Miller
94d85cd873 add support for environment in grav scheduler
Signed-off-by: Andy Miller <rhuk@mac.com>
2025-12-03 10:41:29 -07:00
Andy Miller
63bbc1cac6 flex-objects caching fix
Signed-off-by: Andy Miller <rhuk@mac.com>
2025-11-30 16:06:31 -07:00
Andy Miller
528032b11a update changelog
Signed-off-by: Andy Miller <rhuk@mac.com>
2025-11-29 21:18:57 -07:00
Andy Miller
a4c3a3af6d Add isindex to XSS dangerous tags (CVE-2023-31506 / GHSA-h85h-xm8x-vfw7)
The original CVE-2023-31506 fix missed the deprecated <isindex> HTML tag,
which can still be used for XSS via event handlers like onmouseover.

The <isindex> tag is deprecated in HTML5 and has no legitimate modern use.
2025-11-29 21:07:23 -07:00
Andy Miller
0c38968c58 Fix email disclosure in user edit page title (GHSA-4cwq-j7jv-qmwg)
Security fix for IDOR-style information disclosure where the admin
email address was leaked in the <title> tag even on 403 Forbidden
responses.

The edit view title template previously included the email:
  {{ fullname ?? username }} <{{ email }}>

Now shows only the name/username without email:
  {{ fullname ?? username }}

This prevents low-privilege users from enumerating admin email
addresses by accessing /admin/accounts/users/{username} URLs.
2025-11-29 18:27:08 -07:00
Andy Miller
9d11094e41 Merge branch 'fix/GHSA-x62q-p736-3997-GHSA-gq3g-666w-7h85-admin-security' into 1.8 2025-11-29 17:52:03 -07:00