repo stringlengths 5 53 | pr_number int32 1 321k | task_type stringclasses 2
values | issue_text stringlengths 0 81.2k | pr_title stringlengths 1 319 | pr_body stringlengths 0 105k | base_sha stringlengths 40 40 | head_sha stringlengths 40 40 | gold_diff stringlengths 0 202M | changed_files listlengths 0 100 | review_threads listlengths 0 100 | test_patch stringlengths 0 23.4M | merged bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
unopim/unopim | 474 | comment_to_fix | Feat/help and installer 2.1 | `resolveSelectedPackages()` uses `array_map(...$package['label']...)` for the `multiselect()` options, which drops the package keys. In interactive installs, `multiselect()` will therefore return labels (e.g. "Shopify Connector"), but the loop below expects keys (e.g. "shopify"), causing every selection to be treated a... | 4aa15eb255a44a7412ef3d20c2b2984248702266 | 8d2d4b8dd2e45aa06c586c24e23f76ddf15bf9c1 | diff --git a/packages/Webkul/Installer/src/Console/Commands/Installer.php b/packages/Webkul/Installer/src/Console/Commands/Installer.php
index 0df8b223d..3b380ab01 100644
--- a/packages/Webkul/Installer/src/Console/Commands/Installer.php
+++ b/packages/Webkul/Installer/src/Console/Commands/Installer.php
@@ -6,6 +6,8 @@... | [
"packages/Webkul/Installer/src/Console/Commands/Installer.php"
] | [
{
"comment": "`resolveSelectedPackages()` uses `array_map(...$package['label']...)` for the `multiselect()` options, which drops the package keys. In interactive installs, `multiselect()` will therefore return labels (e.g. \"Shopify Connector\"), but the loop below expects keys (e.g. \"shopify\"), causing every... | true | ||
unopim/unopim | 474 | comment_to_fix | Feat/help and installer 2.1 | `json_decode()` can return `null` (invalid JSON / unexpected response). Accessing `$data['packages']...` on a non-array triggers PHP warnings (not caught by the try/catch), which can leak into logs/output. Guard the decoded value before indexing into it. | 4aa15eb255a44a7412ef3d20c2b2984248702266 | 8d2d4b8dd2e45aa06c586c24e23f76ddf15bf9c1 | diff --git a/packages/Webkul/Admin/src/Helpers/VersionCheck.php b/packages/Webkul/Admin/src/Helpers/VersionCheck.php
new file mode 100644
index 000000000..c3892b37a
--- /dev/null
+++ b/packages/Webkul/Admin/src/Helpers/VersionCheck.php
@@ -0,0 +1,99 @@
+<?php
+
+namespace Webkul\Admin\Helpers;
+
+use Illuminate\Support... | [
"packages/Webkul/Admin/src/Helpers/VersionCheck.php"
] | [
{
"comment": "`json_decode()` can return `null` (invalid JSON / unexpected response). Accessing `$data['packages']...` on a non-array triggers PHP warnings (not caught by the try/catch), which can leak into logs/output. Guard the decoded value before indexing into it.",
"path": "packages/Webkul/Admin/src/He... | true | ||
unopim/unopim | 474 | comment_to_fix | Feat/help and installer 2.1 | The repository checks for an existing dismissal and then does a separate `create()`. Because the DB migration adds a unique index on (`admin_id`, `banner`, `version`), concurrent requests can still race and throw a duplicate-key exception, breaking the intended idempotency. Prefer an atomic `firstOrCreate()`/upsert-sty... | 4aa15eb255a44a7412ef3d20c2b2984248702266 | 8d2d4b8dd2e45aa06c586c24e23f76ddf15bf9c1 | diff --git a/packages/Webkul/User/src/Repositories/AdminPromoDismissalRepository.php b/packages/Webkul/User/src/Repositories/AdminPromoDismissalRepository.php
new file mode 100644
index 000000000..699f3644d
--- /dev/null
+++ b/packages/Webkul/User/src/Repositories/AdminPromoDismissalRepository.php
@@ -0,0 +1,41 @@
+<?p... | [
"packages/Webkul/User/src/Repositories/AdminPromoDismissalRepository.php"
] | [
{
"comment": "The repository checks for an existing dismissal and then does a separate `create()`. Because the DB migration adds a unique index on (`admin_id`, `banner`, `version`), concurrent requests can still race and throw a duplicate-key exception, breaking the intended idempotency. Prefer an atomic `first... | true | ||
unopim/unopim | 474 | comment_to_fix | Feat/help and installer 2.1 | `setInterval(this.next, 6000)` passes an unbound method reference. Depending on the Vue/component setup, `this` inside `next()` can be lost when invoked by the timer, which would break rotation. Binding via an arrow function avoids that risk. | 4aa15eb255a44a7412ef3d20c2b2984248702266 | 8d2d4b8dd2e45aa06c586c24e23f76ddf15bf9c1 | diff --git a/packages/Webkul/Admin/src/Resources/views/components/promo-bar.blade.php b/packages/Webkul/Admin/src/Resources/views/components/promo-bar.blade.php
new file mode 100644
index 000000000..53dbbba60
--- /dev/null
+++ b/packages/Webkul/Admin/src/Resources/views/components/promo-bar.blade.php
@@ -0,0 +1,189 @@
... | [
"packages/Webkul/Admin/src/Resources/views/components/promo-bar.blade.php"
] | [
{
"comment": "`setInterval(this.next, 6000)` passes an unbound method reference. Depending on the Vue/component setup, `this` inside `next()` can be lost when invoked by the timer, which would break rotation. Binding via an arrow function avoids that risk.",
"path": "packages/Webkul/Admin/src/Resources/view... | true | ||
unopim/unopim | 474 | comment_to_fix | Feat/help and installer 2.1 | Menu config sets the Help item sort to `99999`, but this test asserts `10`, so it will fail even when the menu entry is present. Either relax the assertion (e.g. `toBeGreaterThan(9)`) or match the configured value. | 4aa15eb255a44a7412ef3d20c2b2984248702266 | 8d2d4b8dd2e45aa06c586c24e23f76ddf15bf9c1 | diff --git a/packages/Webkul/Admin/tests/Feature/Help/HelpMenuAclTest.php b/packages/Webkul/Admin/tests/Feature/Help/HelpMenuAclTest.php
new file mode 100644
index 000000000..139743a72
--- /dev/null
+++ b/packages/Webkul/Admin/tests/Feature/Help/HelpMenuAclTest.php
@@ -0,0 +1,16 @@
+<?php
+
+it('registers the help menu... | [
"packages/Webkul/Admin/tests/Feature/Help/HelpMenuAclTest.php"
] | [
{
"comment": "Menu config sets the Help item sort to `99999`, but this test asserts `10`, so it will fail even when the menu entry is present. Either relax the assertion (e.g. `toBeGreaterThan(9)`) or match the configured value.",
"path": "packages/Webkul/Admin/tests/Feature/Help/HelpMenuAclTest.php",
"... | true | ||
unopim/unopim | 474 | comment_to_fix | Feat/help and installer 2.1 | Using preg_replace() with a replacement string that includes unescaped user-provided values can corrupt the .env when the value contains "$" (common in passwords), because preg_replace interprets $1/$2 as backreferences. This can lead to wrong DB credentials or Elasticsearch settings being written. | 4aa15eb255a44a7412ef3d20c2b2984248702266 | 8d2d4b8dd2e45aa06c586c24e23f76ddf15bf9c1 | diff --git a/packages/Webkul/Installer/src/Helpers/EnvironmentManager.php b/packages/Webkul/Installer/src/Helpers/EnvironmentManager.php
index 9112466f8..483823cc7 100644
--- a/packages/Webkul/Installer/src/Helpers/EnvironmentManager.php
+++ b/packages/Webkul/Installer/src/Helpers/EnvironmentManager.php
@@ -73,14 +73,5... | [
"packages/Webkul/Installer/src/Helpers/EnvironmentManager.php"
] | [
{
"comment": "Using preg_replace() with a replacement string that includes unescaped user-provided values can corrupt the .env when the value contains \"$\" (common in passwords), because preg_replace interprets $1/$2 as backreferences. This can lead to wrong DB credentials or Elasticsearch settings being writt... | true | ||
unopim/unopim | 474 | comment_to_fix | Feat/help and installer 2.1 | createDatabaseIfNotExists() assumes the *connection name* is also the DB driver by comparing `$connection === 'pgsql'`. If the default connection name is customized (common), this will choose the wrong branch and potentially run MySQL SQL against PostgreSQL (or vice versa). Use the configured driver from `database.conn... | 4aa15eb255a44a7412ef3d20c2b2984248702266 | 8d2d4b8dd2e45aa06c586c24e23f76ddf15bf9c1 | diff --git a/packages/Webkul/Installer/src/Helpers/DatabaseManager.php b/packages/Webkul/Installer/src/Helpers/DatabaseManager.php
index 9c81241b5..1c93994cb 100644
--- a/packages/Webkul/Installer/src/Helpers/DatabaseManager.php
+++ b/packages/Webkul/Installer/src/Helpers/DatabaseManager.php
@@ -63,6 +63,58 @@ public f... | [
"packages/Webkul/Installer/src/Helpers/DatabaseManager.php"
] | [
{
"comment": "createDatabaseIfNotExists() assumes the *connection name* is also the DB driver by comparing `$connection === 'pgsql'`. If the default connection name is customized (common), this will choose the wrong branch and potentially run MySQL SQL against PostgreSQL (or vice versa). Use the configured driv... | true | ||
unopim/unopim | 474 | comment_to_fix | Feat/help and installer 2.1 | This config override should branch on the connection *driver* (e.g. 'pgsql'), not the connection name. With the proposed `$driver` variable, use `$driver === 'pgsql'` here to reliably select the maintenance database. | 4aa15eb255a44a7412ef3d20c2b2984248702266 | 8d2d4b8dd2e45aa06c586c24e23f76ddf15bf9c1 | diff --git a/packages/Webkul/Installer/src/Helpers/DatabaseManager.php b/packages/Webkul/Installer/src/Helpers/DatabaseManager.php
index 9c81241b5..1c93994cb 100644
--- a/packages/Webkul/Installer/src/Helpers/DatabaseManager.php
+++ b/packages/Webkul/Installer/src/Helpers/DatabaseManager.php
@@ -63,6 +63,58 @@ public f... | [
"packages/Webkul/Installer/src/Helpers/DatabaseManager.php"
] | [
{
"comment": "This config override should branch on the connection *driver* (e.g. 'pgsql'), not the connection name. With the proposed `$driver` variable, use `$driver === 'pgsql'` here to reliably select the maintenance database.",
"path": "packages/Webkul/Installer/src/Helpers/DatabaseManager.php",
"h... | true | ||
unopim/unopim | 474 | comment_to_fix | Feat/help and installer 2.1 | This PostgreSQL branch check should use the configured driver rather than the connection name (see `$driver` comment above). Otherwise the wrong SQL path can be executed when the default connection is not literally named 'pgsql'. | 4aa15eb255a44a7412ef3d20c2b2984248702266 | 8d2d4b8dd2e45aa06c586c24e23f76ddf15bf9c1 | diff --git a/packages/Webkul/Installer/src/Helpers/DatabaseManager.php b/packages/Webkul/Installer/src/Helpers/DatabaseManager.php
index 9c81241b5..1c93994cb 100644
--- a/packages/Webkul/Installer/src/Helpers/DatabaseManager.php
+++ b/packages/Webkul/Installer/src/Helpers/DatabaseManager.php
@@ -63,6 +63,58 @@ public f... | [
"packages/Webkul/Installer/src/Helpers/DatabaseManager.php"
] | [
{
"comment": "This PostgreSQL branch check should use the configured driver rather than the connection name (see `$driver` comment above). Otherwise the wrong SQL path can be executed when the default connection is not literally named 'pgsql'.",
"path": "packages/Webkul/Installer/src/Helpers/DatabaseManager... | true | ||
unopim/unopim | 474 | comment_to_fix | Feat/help and installer 2.1 | Help routes have an ACL entry ('help'), but the controller action doesn't enforce any permission check. Other admin controllers gate access with `bouncer()->hasPermission(...)`; without it, any authenticated admin can access this page regardless of assigned permissions. | 4aa15eb255a44a7412ef3d20c2b2984248702266 | 8d2d4b8dd2e45aa06c586c24e23f76ddf15bf9c1 | diff --git a/packages/Webkul/Admin/src/Http/Controllers/HelpController.php b/packages/Webkul/Admin/src/Http/Controllers/HelpController.php
new file mode 100644
index 000000000..784b0345f
--- /dev/null
+++ b/packages/Webkul/Admin/src/Http/Controllers/HelpController.php
@@ -0,0 +1,46 @@
+<?php
+
+namespace Webkul\Admin\H... | [
"packages/Webkul/Admin/src/Http/Controllers/HelpController.php"
] | [
{
"comment": "Help routes have an ACL entry ('help'), but the controller action doesn't enforce any permission check. Other admin controllers gate access with `bouncer()->hasPermission(...)`; without it, any authenticated admin can access this page regardless of assigned permissions.",
"path": "packages/Web... | true | ||
unopim/unopim | 474 | comment_to_fix | Feat/help and installer 2.1 | dismissPromo() should both enforce the Help permission (so it matches the ACL/menu) and avoid trusting the client-supplied `version` field. As-is, an admin can submit an arbitrary version to suppress future upgrade prompts; compute the scoped version server-side (upgrade => latestVersion, otherwise empty). | 4aa15eb255a44a7412ef3d20c2b2984248702266 | 8d2d4b8dd2e45aa06c586c24e23f76ddf15bf9c1 | diff --git a/packages/Webkul/Admin/src/Http/Controllers/HelpController.php b/packages/Webkul/Admin/src/Http/Controllers/HelpController.php
new file mode 100644
index 000000000..784b0345f
--- /dev/null
+++ b/packages/Webkul/Admin/src/Http/Controllers/HelpController.php
@@ -0,0 +1,46 @@
+<?php
+
+namespace Webkul\Admin\H... | [
"packages/Webkul/Admin/src/Http/Controllers/HelpController.php"
] | [
{
"comment": "dismissPromo() should both enforce the Help permission (so it matches the ACL/menu) and avoid trusting the client-supplied `version` field. As-is, an admin can submit an arbitrary version to suppress future upgrade prompts; compute the scoped version server-side (upgrade => latestVersion, otherwis... | true | ||
unopim/unopim | 474 | comment_to_fix | Feat/help and installer 2.1 | When writing updated env lines via preg_replace, the replacement string can be corrupted if the value contains `$` (common in passwords/API keys), because preg_replace treats `$1`, `$2`, etc. as backreferences. This can silently mangle DB_PASSWORD / API keys in .env. | 4aa15eb255a44a7412ef3d20c2b2984248702266 | 8d2d4b8dd2e45aa06c586c24e23f76ddf15bf9c1 | diff --git a/packages/Webkul/Installer/src/Helpers/EnvironmentManager.php b/packages/Webkul/Installer/src/Helpers/EnvironmentManager.php
index 9112466f8..483823cc7 100644
--- a/packages/Webkul/Installer/src/Helpers/EnvironmentManager.php
+++ b/packages/Webkul/Installer/src/Helpers/EnvironmentManager.php
@@ -73,14 +73,5... | [
"packages/Webkul/Installer/src/Helpers/EnvironmentManager.php"
] | [
{
"comment": "When writing updated env lines via preg_replace, the replacement string can be corrupted if the value contains `$` (common in passwords/API keys), because preg_replace treats `$1`, `$2`, etc. as backreferences. This can silently mangle DB_PASSWORD / API keys in .env.",
"path": "packages/Webkul... | true | ||
unopim/unopim | 474 | comment_to_fix | Feat/help and installer 2.1 | `createDatabaseIfNotExists()` treats every non-`pgsql` connection as MySQL (backticks, `IF NOT EXISTS`, utf8mb4 collation). Since the installer supports `sqlsrv`, this will issue invalid SQL for SQL Server and likely break installs when DB_CONNECTION=sqlsrv. Also, PostgreSQL detection should key off the connection driv... | 4aa15eb255a44a7412ef3d20c2b2984248702266 | 8d2d4b8dd2e45aa06c586c24e23f76ddf15bf9c1 | diff --git a/packages/Webkul/Installer/src/Helpers/DatabaseManager.php b/packages/Webkul/Installer/src/Helpers/DatabaseManager.php
index 9c81241b5..1c93994cb 100644
--- a/packages/Webkul/Installer/src/Helpers/DatabaseManager.php
+++ b/packages/Webkul/Installer/src/Helpers/DatabaseManager.php
@@ -63,6 +63,58 @@ public f... | [
"packages/Webkul/Installer/src/Helpers/DatabaseManager.php"
] | [
{
"comment": "`createDatabaseIfNotExists()` treats every non-`pgsql` connection as MySQL (backticks, `IF NOT EXISTS`, utf8mb4 collation). Since the installer supports `sqlsrv`, this will issue invalid SQL for SQL Server and likely break installs when DB_CONNECTION=sqlsrv. Also, PostgreSQL detection should key o... | true | ||
unopim/unopim | 474 | comment_to_fix | Feat/help and installer 2.1 | `Artisan::registerCommand()` is not a Laravel (v12) facade method, so this will error at runtime when demo seeding attempts to register indexers during a web-based install. Use the Artisan application instance (`app('artisan')->add(...)`) to register command instances before calling `Artisan::call()`. | 4aa15eb255a44a7412ef3d20c2b2984248702266 | 8d2d4b8dd2e45aa06c586c24e23f76ddf15bf9c1 | diff --git a/packages/Webkul/Installer/src/Helpers/DemoDataInstaller.php b/packages/Webkul/Installer/src/Helpers/DemoDataInstaller.php
index 140b60dd4..3795d916f 100644
--- a/packages/Webkul/Installer/src/Helpers/DemoDataInstaller.php
+++ b/packages/Webkul/Installer/src/Helpers/DemoDataInstaller.php
@@ -6,6 +6,9 @@
us... | [
"packages/Webkul/Installer/src/Helpers/DemoDataInstaller.php"
] | [
{
"comment": "`Artisan::registerCommand()` is not a Laravel (v12) facade method, so this will error at runtime when demo seeding attempts to register indexers during a web-based install. Use the Artisan application instance (`app('artisan')->add(...)`) to register command instances before calling `Artisan::call... | true | ||
unopim/unopim | 474 | comment_to_fix | Feat/help and installer 2.1 | Same issue here: `Artisan::registerCommand()` is not available on the Laravel Artisan facade. This will break completeness recalculation when demo data is seeded via the web installer. Register the command via the Artisan application instance before calling it. | 4aa15eb255a44a7412ef3d20c2b2984248702266 | 8d2d4b8dd2e45aa06c586c24e23f76ddf15bf9c1 | diff --git a/packages/Webkul/Installer/src/Helpers/DemoDataInstaller.php b/packages/Webkul/Installer/src/Helpers/DemoDataInstaller.php
index 140b60dd4..3795d916f 100644
--- a/packages/Webkul/Installer/src/Helpers/DemoDataInstaller.php
+++ b/packages/Webkul/Installer/src/Helpers/DemoDataInstaller.php
@@ -6,6 +6,9 @@
us... | [
"packages/Webkul/Installer/src/Helpers/DemoDataInstaller.php"
] | [
{
"comment": "Same issue here: `Artisan::registerCommand()` is not available on the Laravel Artisan facade. This will break completeness recalculation when demo data is seeded via the web installer. Register the command via the Artisan application instance before calling it.",
"path": "packages/Webkul/Insta... | true | ||
unopim/unopim | 474 | comment_to_fix | Feat/help and installer 2.1 | `firstOrCreate()` is still a read-then-insert operation and can throw a duplicate-key exception under concurrent requests with the unique (admin_id, banner, version) index. The current comment claims it prevents that race, but it doesn't. To make dismissals truly idempotent, handle (and ignore) unique-constraint violat... | 4aa15eb255a44a7412ef3d20c2b2984248702266 | 8d2d4b8dd2e45aa06c586c24e23f76ddf15bf9c1 | diff --git a/packages/Webkul/User/src/Repositories/AdminPromoDismissalRepository.php b/packages/Webkul/User/src/Repositories/AdminPromoDismissalRepository.php
new file mode 100644
index 000000000..699f3644d
--- /dev/null
+++ b/packages/Webkul/User/src/Repositories/AdminPromoDismissalRepository.php
@@ -0,0 +1,41 @@
+<?p... | [
"packages/Webkul/User/src/Repositories/AdminPromoDismissalRepository.php"
] | [
{
"comment": "`firstOrCreate()` is still a read-then-insert operation and can throw a duplicate-key exception under concurrent requests with the unique (admin_id, banner, version) index. The current comment claims it prevents that race, but it doesn't. To make dismissals truly idempotent, handle (and ignore) un... | true | ||
unopim/unopim | 474 | comment_to_fix | Feat/help and installer 2.1 | `Container::extend()` invokes the extender callback with at least the resolved service instance. This zero-argument arrow function will throw an ArgumentCountError when the extender is executed, breaking the test before the command runs. Use a callback that accepts the provided argument (like the other installer comman... | 4aa15eb255a44a7412ef3d20c2b2984248702266 | 8d2d4b8dd2e45aa06c586c24e23f76ddf15bf9c1 | diff --git a/packages/Webkul/Installer/tests/Feature/InstallerOptionalPackagesTest.php b/packages/Webkul/Installer/tests/Feature/InstallerOptionalPackagesTest.php
new file mode 100644
index 000000000..1a219028a
--- /dev/null
+++ b/packages/Webkul/Installer/tests/Feature/InstallerOptionalPackagesTest.php
@@ -0,0 +1,88 @... | [
"packages/Webkul/Installer/tests/Feature/InstallerOptionalPackagesTest.php"
] | [
{
"comment": "`Container::extend()` invokes the extender callback with at least the resolved service instance. This zero-argument arrow function will throw an ArgumentCountError when the extender is executed, breaking the test before the command runs. Use a callback that accepts the provided argument (like the ... | true | ||
unopim/unopim | 474 | comment_to_fix | Feat/help and installer 2.1 | Same issue as above: the extender callback passed to `app()->extend()` cannot be a zero-argument function, otherwise the container will raise an ArgumentCountError when applying extenders. | 4aa15eb255a44a7412ef3d20c2b2984248702266 | 8d2d4b8dd2e45aa06c586c24e23f76ddf15bf9c1 | diff --git a/packages/Webkul/Installer/tests/Feature/InstallerOptionalPackagesTest.php b/packages/Webkul/Installer/tests/Feature/InstallerOptionalPackagesTest.php
new file mode 100644
index 000000000..1a219028a
--- /dev/null
+++ b/packages/Webkul/Installer/tests/Feature/InstallerOptionalPackagesTest.php
@@ -0,0 +1,88 @... | [
"packages/Webkul/Installer/tests/Feature/InstallerOptionalPackagesTest.php"
] | [
{
"comment": "Same issue as above: the extender callback passed to `app()->extend()` cannot be a zero-argument function, otherwise the container will raise an ArgumentCountError when applying extenders.",
"path": "packages/Webkul/Installer/tests/Feature/InstallerOptionalPackagesTest.php",
"hunk": "@@ -0... | true | ||
unopim/unopim | 474 | comment_to_fix | Feat/help and installer 2.1 | Same issue as above: `app()->extend()` will call this callback with arguments; a zero-argument arrow function will crash the test run. Accept the `$service` argument to keep the extender compatible. | 4aa15eb255a44a7412ef3d20c2b2984248702266 | 8d2d4b8dd2e45aa06c586c24e23f76ddf15bf9c1 | diff --git a/packages/Webkul/Installer/tests/Feature/InstallerOptionalPackagesTest.php b/packages/Webkul/Installer/tests/Feature/InstallerOptionalPackagesTest.php
new file mode 100644
index 000000000..1a219028a
--- /dev/null
+++ b/packages/Webkul/Installer/tests/Feature/InstallerOptionalPackagesTest.php
@@ -0,0 +1,88 @... | [
"packages/Webkul/Installer/tests/Feature/InstallerOptionalPackagesTest.php"
] | [
{
"comment": "Same issue as above: `app()->extend()` will call this callback with arguments; a zero-argument arrow function will crash the test run. Accept the `$service` argument to keep the extender compatible.",
"path": "packages/Webkul/Installer/tests/Feature/InstallerOptionalPackagesTest.php",
"hun... | true | ||
unopim/unopim | 474 | comment_to_fix | Feat/help and installer 2.1 | Same issue as above: the extender callback must accept the arguments provided by the container; otherwise this test will fail with an ArgumentCountError when the extender is applied. | 4aa15eb255a44a7412ef3d20c2b2984248702266 | 8d2d4b8dd2e45aa06c586c24e23f76ddf15bf9c1 | diff --git a/packages/Webkul/Installer/tests/Feature/InstallerOptionalPackagesTest.php b/packages/Webkul/Installer/tests/Feature/InstallerOptionalPackagesTest.php
new file mode 100644
index 000000000..1a219028a
--- /dev/null
+++ b/packages/Webkul/Installer/tests/Feature/InstallerOptionalPackagesTest.php
@@ -0,0 +1,88 @... | [
"packages/Webkul/Installer/tests/Feature/InstallerOptionalPackagesTest.php"
] | [
{
"comment": "Same issue as above: the extender callback must accept the arguments provided by the container; otherwise this test will fail with an ArgumentCountError when the extender is applied.",
"path": "packages/Webkul/Installer/tests/Feature/InstallerOptionalPackagesTest.php",
"hunk": "@@ -0,0 +1,... | true | ||
unopim/unopim | 368 | issue_to_patch | fix: gate MySQL bulk-mode session vars by driver in product importer | Product import on PostgreSQL crashed in saveProductsData with SQLSTATE[42704] "unrecognized configuration parameter unique_checks" because the importer issued raw `SET SESSION unique_checks=0` / `foreign_key_checks=0` statements unconditionally — both are MySQL-only session vars.
Extracted the toggle into a `toggleM... | c95fbc5c51654adfc9b13b64313210b903f05876 | be590e80fdab4949c487c4d05d4b0faf71e6d3b4 | diff --git a/packages/Webkul/DataTransfer/src/Helpers/Importers/Product/Importer.php b/packages/Webkul/DataTransfer/src/Helpers/Importers/Product/Importer.php
index a3cfffdcc..ae713ca97 100644
--- a/packages/Webkul/DataTransfer/src/Helpers/Importers/Product/Importer.php
+++ b/packages/Webkul/DataTransfer/src/Helpers/Im... | [
"packages/Webkul/DataTransfer/src/Helpers/Importers/Product/Importer.php",
"packages/Webkul/DataTransfer/tests/Unit/Helpers/Importers/PgsqlBulkModeCompatibilityTest.php"
] | [
{
"comment": "The final `expect(true)->toBeTrue()` assertion is redundant here (the test already fails on any exception, and it performs meaningful assertions earlier). Removing it will keep the test focused on the actual behavior under test.\n```suggestion\n\n```",
"path": "packages/Webkul/DataTransfer/tes... | diff --git a/packages/Webkul/DataTransfer/tests/Unit/Helpers/Importers/PgsqlBulkModeCompatibilityTest.php b/packages/Webkul/DataTransfer/tests/Unit/Helpers/Importers/PgsqlBulkModeCompatibilityTest.php
new file mode 100644
index 000000000..886f06394
--- /dev/null
+++ b/packages/Webkul/DataTransfer/tests/Unit/Helpers/Imp... | true | |
unopim/unopim | 368 | comment_to_fix | fix: gate MySQL bulk-mode session vars by driver in product importer | The final `expect(true)->toBeTrue()` assertion is redundant here (the test already fails on any exception, and it performs meaningful assertions earlier). Removing it will keep the test focused on the actual behavior under test.
```suggestion
``` | c95fbc5c51654adfc9b13b64313210b903f05876 | be590e80fdab4949c487c4d05d4b0faf71e6d3b4 | diff --git a/packages/Webkul/DataTransfer/tests/Unit/Helpers/Importers/PgsqlBulkModeCompatibilityTest.php b/packages/Webkul/DataTransfer/tests/Unit/Helpers/Importers/PgsqlBulkModeCompatibilityTest.php
new file mode 100644
index 000000000..886f06394
--- /dev/null
+++ b/packages/Webkul/DataTransfer/tests/Unit/Helpers/Imp... | [
"packages/Webkul/DataTransfer/tests/Unit/Helpers/Importers/PgsqlBulkModeCompatibilityTest.php"
] | [
{
"comment": "The final `expect(true)->toBeTrue()` assertion is redundant here (the test already fails on any exception, and it performs meaningful assertions earlier). Removing it will keep the test focused on the actual behavior under test.\n```suggestion\n\n```",
"path": "packages/Webkul/DataTransfer/tes... | true | ||
unopim/unopim | 368 | comment_to_fix | fix: gate MySQL bulk-mode session vars by driver in product importer | `toggleMysqlBulkMode()` currently only enables the bulk-mode path when `getDriverName()` is exactly `mysql`. This will unintentionally disable the optimization on `mariadb` connections (Laravel supports `mariadb` as a distinct driver). Consider treating both `mysql` and `mariadb` as MySQL-compatible here (e.g., `in_arr... | c95fbc5c51654adfc9b13b64313210b903f05876 | be590e80fdab4949c487c4d05d4b0faf71e6d3b4 | diff --git a/packages/Webkul/DataTransfer/src/Helpers/Importers/Product/Importer.php b/packages/Webkul/DataTransfer/src/Helpers/Importers/Product/Importer.php
index a3cfffdcc..ae713ca97 100644
--- a/packages/Webkul/DataTransfer/src/Helpers/Importers/Product/Importer.php
+++ b/packages/Webkul/DataTransfer/src/Helpers/Im... | [
"packages/Webkul/DataTransfer/src/Helpers/Importers/Product/Importer.php"
] | [
{
"comment": "`toggleMysqlBulkMode()` currently only enables the bulk-mode path when `getDriverName()` is exactly `mysql`. This will unintentionally disable the optimization on `mariadb` connections (Laravel supports `mariadb` as a distinct driver). Consider treating both `mysql` and `mariadb` as MySQL-compatib... | true | ||
unopim/unopim | 367 | issue_to_patch | fix: honour runtime DB_CONNECTION when re-running installer after dri… | …ver switch
When a user switched DB_CONNECTION in .env (e.g. MySQL -> PostgreSQL) and re-ran `php artisan unopim:install`, migrations targeted the OLD driver if a stale config cache pinned `database.default`. The installer overrode per-connection settings but never updated `database.default` or the active connection... | c95fbc5c51654adfc9b13b64313210b903f05876 | b4e3edf7ece7cb409287e25c551b7e04ea1baf73 | diff --git a/packages/Webkul/Installer/src/Console/Commands/Installer.php b/packages/Webkul/Installer/src/Console/Commands/Installer.php
index ccccf86bb..b0dd21e8d 100644
--- a/packages/Webkul/Installer/src/Console/Commands/Installer.php
+++ b/packages/Webkul/Installer/src/Console/Commands/Installer.php
@@ -557,7 +557,... | [
"packages/Webkul/Installer/src/Console/Commands/Installer.php",
"packages/Webkul/Installer/tests/Unit/InstallerLoadEnvDatabaseDefaultTest.php"
] | [
{
"comment": "`loadEnvConfigAtRuntime()` pulls values via `Installer::getEnvAtRuntime()`, which reads from `base_path('.env')` (not `$_ENV`). Mutating `$_ENV['DB_CONNECTION']` here won’t deterministically affect the method under test, so the assertion may depend on whatever is in the on-disk `.env`. Consider wr... | diff --git a/packages/Webkul/Installer/tests/Unit/InstallerLoadEnvDatabaseDefaultTest.php b/packages/Webkul/Installer/tests/Unit/InstallerLoadEnvDatabaseDefaultTest.php
new file mode 100644
index 000000000..7802f7cab
--- /dev/null
+++ b/packages/Webkul/Installer/tests/Unit/InstallerLoadEnvDatabaseDefaultTest.php
@@ -0,... | true | |
unopim/unopim | 367 | comment_to_fix | fix: honour runtime DB_CONNECTION when re-running installer after dri… | `loadEnvConfigAtRuntime()` pulls values via `Installer::getEnvAtRuntime()`, which reads from `base_path('.env')` (not `$_ENV`). Mutating `$_ENV['DB_CONNECTION']` here won’t deterministically affect the method under test, so the assertion may depend on whatever is in the on-disk `.env`. Consider writing a temporary `.en... | c95fbc5c51654adfc9b13b64313210b903f05876 | b4e3edf7ece7cb409287e25c551b7e04ea1baf73 | diff --git a/packages/Webkul/Installer/tests/Unit/InstallerLoadEnvDatabaseDefaultTest.php b/packages/Webkul/Installer/tests/Unit/InstallerLoadEnvDatabaseDefaultTest.php
new file mode 100644
index 000000000..7802f7cab
--- /dev/null
+++ b/packages/Webkul/Installer/tests/Unit/InstallerLoadEnvDatabaseDefaultTest.php
@@ -0,... | [
"packages/Webkul/Installer/tests/Unit/InstallerLoadEnvDatabaseDefaultTest.php"
] | [
{
"comment": "`loadEnvConfigAtRuntime()` pulls values via `Installer::getEnvAtRuntime()`, which reads from `base_path('.env')` (not `$_ENV`). Mutating `$_ENV['DB_CONNECTION']` here won’t deterministically affect the method under test, so the assertion may depend on whatever is in the on-disk `.env`. Consider wr... | true | ||
unopim/unopim | 367 | comment_to_fix | fix: honour runtime DB_CONNECTION when re-running installer after dri… | The test only restores `$_ENV` in `finally`, but it also changes `config('database.default')` / default connection during execution. Tests in this package use a base `TestCase` that includes `DatabaseTransactions`, so leaving the default connection changed can interfere with transaction rollback and create flaky failur... | c95fbc5c51654adfc9b13b64313210b903f05876 | b4e3edf7ece7cb409287e25c551b7e04ea1baf73 | diff --git a/packages/Webkul/Installer/tests/Unit/InstallerLoadEnvDatabaseDefaultTest.php b/packages/Webkul/Installer/tests/Unit/InstallerLoadEnvDatabaseDefaultTest.php
new file mode 100644
index 000000000..7802f7cab
--- /dev/null
+++ b/packages/Webkul/Installer/tests/Unit/InstallerLoadEnvDatabaseDefaultTest.php
@@ -0,... | [
"packages/Webkul/Installer/tests/Unit/InstallerLoadEnvDatabaseDefaultTest.php"
] | [
{
"comment": "The test only restores `$_ENV` in `finally`, but it also changes `config('database.default')` / default connection during execution. Tests in this package use a base `TestCase` that includes `DatabaseTransactions`, so leaving the default connection changed can interfere with transaction rollback a... | true | ||
unopim/unopim | 449 | issue_to_patch | chore(webhook): harden webhook URL validation and dispatch [Master] | ## Summary
Hardens webhook URL validation and dispatch behaviour:
- Tighter URL format validation (scheme allow-list, length cap, required-if active)
- Outbound request safety improvements in the webhook dispatcher
- HTTP redirect handling tightened on outbound calls
- Defense-in-depth checks applied at every relevant ... | a9b1c13099ab8af9942ca190fdb99b33afca2bf0 | 2c89955c07e9b9f67775ee645de113fae1e095ba | diff --git a/packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php b/packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php
index 93c375a96..c6e5b5233 100644
--- a/packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php
+++ b/packages/Webkul/Webhook/src/Http/C... | [
".github/workflows/playwright_test.yml",
"packages/Webkul/Admin/tests/Feature/Webhook/WebhookProductCreateTest.php",
"packages/Webkul/Admin/tests/Feature/Webhook/WebhookSettingsValidationTest.php",
"packages/Webkul/Admin/tests/Feature/Webhook/WebhookStatusTest.php",
"packages/Webkul/Webhook/src/Http/Control... | [
{
"comment": "The validator approves a hostname based on a DNS lookup, but the subsequent `Http::post()` resolves the hostname again independently. An attacker-controlled DNS name can return a public IP during validation and then rebind to an internal IP for the actual request, so the SSRF sink is still bypassa... | diff --git a/.github/workflows/playwright_test.yml b/.github/workflows/playwright_test.yml
index 0cba1bff7..014af5c25 100644
--- a/.github/workflows/playwright_test.yml
+++ b/.github/workflows/playwright_test.yml
@@ -48,6 +48,11 @@ jobs:
ADMIN_PASSWORD: ${{ secrets.ADMIN_PASSWORD }}
INVALID_ADMIN_EMAIL: $... | true | |
unopim/unopim | 449 | comment_to_fix | chore(webhook): harden webhook URL validation and dispatch [Master] | The validator approves a hostname based on a DNS lookup, but the subsequent `Http::post()` resolves the hostname again independently. An attacker-controlled DNS name can return a public IP during validation and then rebind to an internal IP for the actual request, so the SSRF sink is still bypassable despite redirect b... | a9b1c13099ab8af9942ca190fdb99b33afca2bf0 | 2c89955c07e9b9f67775ee645de113fae1e095ba | diff --git a/packages/Webkul/Webhook/src/Validators/SafeWebhookUrl.php b/packages/Webkul/Webhook/src/Validators/SafeWebhookUrl.php
new file mode 100644
index 000000000..5df503680
--- /dev/null
+++ b/packages/Webkul/Webhook/src/Validators/SafeWebhookUrl.php
@@ -0,0 +1,199 @@
+<?php
+
+namespace Webkul\Webhook\Validators... | [
"packages/Webkul/Webhook/src/Validators/SafeWebhookUrl.php"
] | [
{
"comment": "The validator approves a hostname based on a DNS lookup, but the subsequent `Http::post()` resolves the hostname again independently. An attacker-controlled DNS name can return a public IP during validation and then rebind to an internal IP for the actual request, so the SSRF sink is still bypassa... | true | ||
unopim/unopim | 449 | comment_to_fix | chore(webhook): harden webhook URL validation and dispatch [Master] | This comment references `sendDeletedToWebhook`, but `WebhookService` does not define that sink; the batch sink added in this change is `sendBatch`. Keeping the sink list accurate matters here because this class documents where the SSRF guard must be applied. | a9b1c13099ab8af9942ca190fdb99b33afca2bf0 | 2c89955c07e9b9f67775ee645de113fae1e095ba | diff --git a/packages/Webkul/Webhook/src/Validators/SafeWebhookUrl.php b/packages/Webkul/Webhook/src/Validators/SafeWebhookUrl.php
new file mode 100644
index 000000000..5df503680
--- /dev/null
+++ b/packages/Webkul/Webhook/src/Validators/SafeWebhookUrl.php
@@ -0,0 +1,199 @@
+<?php
+
+namespace Webkul\Webhook\Validators... | [
"packages/Webkul/Webhook/src/Validators/SafeWebhookUrl.php"
] | [
{
"comment": "This comment references `sendDeletedToWebhook`, but `WebhookService` does not define that sink; the batch sink added in this change is `sendBatch`. Keeping the sink list accurate matters here because this class documents where the SSRF guard must be applied.",
"path": "packages/Webkul/Webhook/... | true | ||
unopim/unopim | 449 | comment_to_fix | chore(webhook): harden webhook URL validation and dispatch [Master] | This test can pass when the validator rejects the public hostname with `dns_lookup_failed`, so it does not actually cover the successful `valid === true` path. Add a deterministic case such as a public IP literal, or mock DNS resolution, so the intended allowed-path behavior is asserted without depending on external DN... | a9b1c13099ab8af9942ca190fdb99b33afca2bf0 | 2c89955c07e9b9f67775ee645de113fae1e095ba | diff --git a/packages/Webkul/Webhook/tests/Unit/SafeWebhookUrlTest.php b/packages/Webkul/Webhook/tests/Unit/SafeWebhookUrlTest.php
new file mode 100644
index 000000000..2e7e206bf
--- /dev/null
+++ b/packages/Webkul/Webhook/tests/Unit/SafeWebhookUrlTest.php
@@ -0,0 +1,154 @@
+<?php
+
+use Webkul\Webhook\Validators\SafeW... | [
"packages/Webkul/Webhook/tests/Unit/SafeWebhookUrlTest.php"
] | [
{
"comment": "This test can pass when the validator rejects the public hostname with `dns_lookup_failed`, so it does not actually cover the successful `valid === true` path. Add a deterministic case such as a public IP literal, or mock DNS resolution, so the intended allowed-path behavior is asserted without de... | true | ||
unopim/unopim | 449 | comment_to_fix | chore(webhook): harden webhook URL validation and dispatch [Master] | Because `SafeWebhookUrl::validate()` performs a real DNS lookup before `Http::fake()` handles the probe request, this test now depends on `example.com` resolving in the test environment. In network-restricted CI it will return the unsafe/DNS failure response before the fake 404 is reached, making the assertion flaky. U... | a9b1c13099ab8af9942ca190fdb99b33afca2bf0 | 2c89955c07e9b9f67775ee645de113fae1e095ba | diff --git a/packages/Webkul/Admin/tests/Feature/Webhook/WebhookSettingsValidationTest.php b/packages/Webkul/Admin/tests/Feature/Webhook/WebhookSettingsValidationTest.php
index bb4067507..1c8c53e7c 100644
--- a/packages/Webkul/Admin/tests/Feature/Webhook/WebhookSettingsValidationTest.php
+++ b/packages/Webkul/Admin/tes... | [
"packages/Webkul/Admin/tests/Feature/Webhook/WebhookSettingsValidationTest.php"
] | [
{
"comment": "Because `SafeWebhookUrl::validate()` performs a real DNS lookup before `Http::fake()` handles the probe request, this test now depends on `example.com` resolving in the test environment. In network-restricted CI it will return the unsafe/DNS failure response before the fake 404 is reached, making ... | true | ||
unopim/unopim | 449 | comment_to_fix | chore(webhook): harden webhook URL validation and dispatch [Master] | This test also relies on real DNS resolution for `example.org` before the `Http::fake()` closure can throw the intended connection exception. If DNS is unavailable, the controller returns the unsafe/DNS failure error instead of the connection-failed error being asserted. Use a deterministic public IP literal or make DN... | a9b1c13099ab8af9942ca190fdb99b33afca2bf0 | 2c89955c07e9b9f67775ee645de113fae1e095ba | diff --git a/packages/Webkul/Admin/tests/Feature/Webhook/WebhookSettingsValidationTest.php b/packages/Webkul/Admin/tests/Feature/Webhook/WebhookSettingsValidationTest.php
index bb4067507..1c8c53e7c 100644
--- a/packages/Webkul/Admin/tests/Feature/Webhook/WebhookSettingsValidationTest.php
+++ b/packages/Webkul/Admin/tes... | [
"packages/Webkul/Admin/tests/Feature/Webhook/WebhookSettingsValidationTest.php"
] | [
{
"comment": "This test also relies on real DNS resolution for `example.org` before the `Http::fake()` closure can throw the intended connection exception. If DNS is unavailable, the controller returns the unsafe/DNS failure error instead of the connection-failed error being asserted. Use a deterministic public... | true | ||
unopim/unopim | 449 | comment_to_fix | chore(webhook): harden webhook URL validation and dispatch [Master] | The service now runs `SafeWebhookUrl::validate()` before the faked HTTP request, and that validator does a real DNS lookup. Seeding `example.com` makes these tests depend on external DNS even though `Http::fake()` is used; in network-restricted CI the dispatch will be blocked before the fake response and no webhook log... | a9b1c13099ab8af9942ca190fdb99b33afca2bf0 | 2c89955c07e9b9f67775ee645de113fae1e095ba | diff --git a/packages/Webkul/Admin/tests/Feature/Webhook/WebhookStatusTest.php b/packages/Webkul/Admin/tests/Feature/Webhook/WebhookStatusTest.php
index ecd3e606b..bcd65440b 100644
--- a/packages/Webkul/Admin/tests/Feature/Webhook/WebhookStatusTest.php
+++ b/packages/Webkul/Admin/tests/Feature/Webhook/WebhookStatusTest... | [
"packages/Webkul/Admin/tests/Feature/Webhook/WebhookStatusTest.php"
] | [
{
"comment": "The service now runs `SafeWebhookUrl::validate()` before the faked HTTP request, and that validator does a real DNS lookup. Seeding `example.com` makes these tests depend on external DNS even though `Http::fake()` is used; in network-restricted CI the dispatch will be blocked before the fake respo... | true | ||
unopim/unopim | 450 | issue_to_patch | chore(webhook): harden webhook URL validation and dispatch [v2.1 LTS] | ## Summary
Hardens webhook URL validation and dispatch behaviour:
- Tighter URL format validation (scheme allow-list, length cap, required-if active)
- Outbound request safety improvements in the webhook dispatcher
- HTTP redirect handling tightened on outbound calls
- Defense-in-depth checks applied at every relevant ... | 5b9bcdb05c5420adc3b4d306b427081ba834c496 | 554f0a021dd33eeb183100cd90d98ce61c2a90cc | diff --git a/packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php b/packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php
index 93c375a96..c6e5b5233 100644
--- a/packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php
+++ b/packages/Webkul/Webhook/src/Http/C... | [
".github/workflows/playwright_test.yml",
"packages/Webkul/Admin/tests/Feature/Webhook/WebhookProductCreateTest.php",
"packages/Webkul/Admin/tests/Feature/Webhook/WebhookSettingsValidationTest.php",
"packages/Webkul/Admin/tests/Feature/Webhook/WebhookStatusTest.php",
"packages/Webkul/Webhook/src/Http/Control... | [
{
"comment": "This validation accepts the string values `true` and `false`, but the code below casts the raw request value with `(int)`. In PHP `(int) 'true'` evaluates to `0`, so a request with `webhook_active=true` passes validation and the required URL rule, but is saved as inactive and skips the safety chec... | diff --git a/.github/workflows/playwright_test.yml b/.github/workflows/playwright_test.yml
index e6274b351..1d3a9c525 100644
--- a/.github/workflows/playwright_test.yml
+++ b/.github/workflows/playwright_test.yml
@@ -48,6 +48,11 @@ jobs:
ADMIN_PASSWORD: ${{ secrets.ADMIN_PASSWORD }}
INVALID_ADMIN_EMAIL: $... | true | |
unopim/unopim | 450 | comment_to_fix | chore(webhook): harden webhook URL validation and dispatch [v2.1 LTS] | This validation accepts the string values `true` and `false`, but the code below casts the raw request value with `(int)`. In PHP `(int) 'true'` evaluates to `0`, so a request with `webhook_active=true` passes validation and the required URL rule, but is saved as inactive and skips the safety check. Either restrict thi... | 5b9bcdb05c5420adc3b4d306b427081ba834c496 | 554f0a021dd33eeb183100cd90d98ce61c2a90cc | diff --git a/packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php b/packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php
index 93c375a96..c6e5b5233 100644
--- a/packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php
+++ b/packages/Webkul/Webhook/src/Http/C... | [
"packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php"
] | [
{
"comment": "This validation accepts the string values `true` and `false`, but the code below casts the raw request value with `(int)`. In PHP `(int) 'true'` evaluates to `0`, so a request with `webhook_active=true` passes validation and the required URL rule, but is saved as inactive and skips the safety chec... | true | ||
unopim/unopim | 450 | comment_to_fix | chore(webhook): harden webhook URL validation and dispatch [v2.1 LTS] | The new unsafe-URL response is returned with HTTP 422, but the existing Vue handler only calls `setErrors(...)` when the status is 400, so the field-level `webhook_url` error included here will not be rendered next to the input. Update the client handler to process 422 validation errors or return the status code that t... | 5b9bcdb05c5420adc3b4d306b427081ba834c496 | 554f0a021dd33eeb183100cd90d98ce61c2a90cc | diff --git a/packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php b/packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php
index 93c375a96..c6e5b5233 100644
--- a/packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php
+++ b/packages/Webkul/Webhook/src/Http/C... | [
"packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php"
] | [
{
"comment": "The new unsafe-URL response is returned with HTTP 422, but the existing Vue handler only calls `setErrors(...)` when the status is 400, so the field-level `webhook_url` error included here will not be rendered next to the input. Update the client handler to process 422 validation errors or return ... | true | ||
unopim/unopim | 450 | comment_to_fix | chore(webhook): harden webhook URL validation and dispatch [v2.1 LTS] | This test now depends on real DNS resolution because `SafeWebhookUrl::validate()` runs before `Http::fake()` intercepts the request. In environments without DNS access, `example.com` resolves to `dns_lookup_failed`, the POST is skipped, and `Http::assertSent()` fails. Use a public IP literal for the seeded URL or make ... | 5b9bcdb05c5420adc3b4d306b427081ba834c496 | 554f0a021dd33eeb183100cd90d98ce61c2a90cc | diff --git a/packages/Webkul/Admin/tests/Feature/Webhook/WebhookProductCreateTest.php b/packages/Webkul/Admin/tests/Feature/Webhook/WebhookProductCreateTest.php
index 09e65a034..fb23f9292 100644
--- a/packages/Webkul/Admin/tests/Feature/Webhook/WebhookProductCreateTest.php
+++ b/packages/Webkul/Admin/tests/Feature/Webh... | [
"packages/Webkul/Admin/tests/Feature/Webhook/WebhookProductCreateTest.php"
] | [
{
"comment": "This test now depends on real DNS resolution because `SafeWebhookUrl::validate()` runs before `Http::fake()` intercepts the request. In environments without DNS access, `example.com` resolves to `dns_lookup_failed`, the POST is skipped, and `Http::assertSent()` fails. Use a public IP literal for t... | true | ||
unopim/unopim | 450 | comment_to_fix | chore(webhook): harden webhook URL validation and dispatch [v2.1 LTS] | Resolving the hostname in `SafeWebhookUrl::validate()` and then passing the original hostname to `Http::post()` leaves a DNS-rebinding window: an attacker-controlled domain can resolve to a public IP during validation and to an internal IP when the HTTP client resolves it for the connection. Redirects are disabled, but... | 5b9bcdb05c5420adc3b4d306b427081ba834c496 | 554f0a021dd33eeb183100cd90d98ce61c2a90cc | diff --git a/packages/Webkul/Webhook/src/Services/WebhookService.php b/packages/Webkul/Webhook/src/Services/WebhookService.php
index d002c041a..7d3727156 100644
--- a/packages/Webkul/Webhook/src/Services/WebhookService.php
+++ b/packages/Webkul/Webhook/src/Services/WebhookService.php
@@ -4,11 +4,13 @@
use Illuminate... | [
"packages/Webkul/Webhook/src/Services/WebhookService.php"
] | [
{
"comment": "Resolving the hostname in `SafeWebhookUrl::validate()` and then passing the original hostname to `Http::post()` leaves a DNS-rebinding window: an attacker-controlled domain can resolve to a public IP during validation and to an internal IP when the HTTP client resolves it for the connection. Redir... | true | ||
unopim/unopim | 450 | comment_to_fix | chore(webhook): harden webhook URL validation and dispatch [v2.1 LTS] | Resolving the hostname in `SafeWebhookUrl::validate()` and then passing the original hostname to `Http::post()` leaves a DNS-rebinding window: an attacker-controlled domain can resolve to a public IP during validation and to an internal IP when the HTTP client resolves it for the connection. Redirects are disabled, but... | 5b9bcdb05c5420adc3b4d306b427081ba834c496 | 554f0a021dd33eeb183100cd90d98ce61c2a90cc | diff --git a/packages/Webkul/Webhook/src/Services/WebhookService.php b/packages/Webkul/Webhook/src/Services/WebhookService.php
index d002c041a..7d3727156 100644
--- a/packages/Webkul/Webhook/src/Services/WebhookService.php
+++ b/packages/Webkul/Webhook/src/Services/WebhookService.php
@@ -4,11 +4,13 @@
use Illuminate... | [
"packages/Webkul/Webhook/src/Services/WebhookService.php"
] | [
{
"comment": "Resolving the hostname in `SafeWebhookUrl::validate()` and then passing the original hostname to `Http::post()` leaves a DNS-rebinding window: an attacker-controlled domain can resolve to a public IP during validation and to an internal IP when the HTTP client resolves it for the connection. Redir... | true | ||
unopim/unopim | 450 | comment_to_fix | chore(webhook): harden webhook URL validation and dispatch [v2.1 LTS] | Resolving the hostname in `SafeWebhookUrl::validate()` and then passing the original hostname to `Http::post()` leaves a DNS-rebinding window: an attacker-controlled domain can resolve to a public IP during validation and to an internal IP when the HTTP client resolves it for the connection. Redirects are disabled, but... | 5b9bcdb05c5420adc3b4d306b427081ba834c496 | 554f0a021dd33eeb183100cd90d98ce61c2a90cc | diff --git a/packages/Webkul/Webhook/src/Services/WebhookService.php b/packages/Webkul/Webhook/src/Services/WebhookService.php
index d002c041a..7d3727156 100644
--- a/packages/Webkul/Webhook/src/Services/WebhookService.php
+++ b/packages/Webkul/Webhook/src/Services/WebhookService.php
@@ -4,11 +4,13 @@
use Illuminate... | [
"packages/Webkul/Webhook/src/Services/WebhookService.php"
] | [
{
"comment": "Resolving the hostname in `SafeWebhookUrl::validate()` and then passing the original hostname to `Http::post()` leaves a DNS-rebinding window: an attacker-controlled domain can resolve to a public IP during validation and to an internal IP when the HTTP client resolves it for the connection. Redir... | true | ||
unopim/unopim | 451 | issue_to_patch | chore(webhook): harden webhook URL validation and dispatch [v2.0 LTS] | ## Summary
Hardens webhook URL validation and dispatch behaviour:
- Tighter URL format validation (scheme allow-list, length cap, required-if active)
- Outbound request safety improvements in the webhook dispatcher
- HTTP redirect handling tightened on outbound calls
- Defense-in-depth checks applied at every relevant ... | 9ce2e8aaf68e0e69583a313d4b8ac1d1c6c3bcbc | e1d98ae3fe82ce2b254c0666113b68723f6550d9 | diff --git a/packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php b/packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php
index 93c375a96..c6e5b5233 100644
--- a/packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php
+++ b/packages/Webkul/Webhook/src/Http/C... | [
".github/workflows/playwright_test.yml",
"packages/Webkul/Admin/tests/Feature/Webhook/WebhookSettingsValidationTest.php",
"packages/Webkul/Admin/tests/Feature/Webhook/WebhookStatusTest.php",
"packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php",
"packages/Webkul/Webhook/src/Resources/... | [
{
"comment": "The save-time SSRF check is gated by `$active === 1`, but the validation rule above allows `webhook_active` values of `'true'` and `'false'` in addition to `0/1`. `(int) 'true'` evaluates to `0`, so a request with `webhook_active=true` and an unsafe `webhook_url` will skip the SSRF validator here ... | diff --git a/.github/workflows/playwright_test.yml b/.github/workflows/playwright_test.yml
index e3199d52b..7d0ade323 100644
--- a/.github/workflows/playwright_test.yml
+++ b/.github/workflows/playwright_test.yml
@@ -42,6 +42,11 @@ jobs:
ADMIN_PASSWORD: ${{ secrets.ADMIN_PASSWORD }}
INVALID_ADMIN_EMAIL: $... | true | |
unopim/unopim | 451 | comment_to_fix | chore(webhook): harden webhook URL validation and dispatch [v2.0 LTS] | The save-time SSRF check is gated by `$active === 1`, but the validation rule above allows `webhook_active` values of `'true'` and `'false'` in addition to `0/1`. `(int) 'true'` evaluates to `0`, so a request with `webhook_active=true` and an unsafe `webhook_url` will skip the SSRF validator here and the URL will be pe... | 9ce2e8aaf68e0e69583a313d4b8ac1d1c6c3bcbc | e1d98ae3fe82ce2b254c0666113b68723f6550d9 | diff --git a/packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php b/packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php
index 93c375a96..c6e5b5233 100644
--- a/packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php
+++ b/packages/Webkul/Webhook/src/Http/C... | [
"packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php"
] | [
{
"comment": "The save-time SSRF check is gated by `$active === 1`, but the validation rule above allows `webhook_active` values of `'true'` and `'false'` in addition to `0/1`. `(int) 'true'` evaluates to `0`, so a request with `webhook_active=true` and an unsafe `webhook_url` will skip the SSRF validator here ... | true | ||
unopim/unopim | 451 | comment_to_fix | chore(webhook): harden webhook URL validation and dispatch [v2.0 LTS] | The IPv6 multicast check `stripos($ip, 'ff') === 0` operates on the raw string and matches any IPv6 literal whose textual form starts with the two characters `ff`, regardless of canonical form. For example, `ff::1` is the address `00ff:0000:…:0001` (first byte `0x00`, not multicast), but `stripos('ff::1', 'ff') === 0` ... | 9ce2e8aaf68e0e69583a313d4b8ac1d1c6c3bcbc | e1d98ae3fe82ce2b254c0666113b68723f6550d9 | diff --git a/packages/Webkul/Webhook/src/Validators/SafeWebhookUrl.php b/packages/Webkul/Webhook/src/Validators/SafeWebhookUrl.php
new file mode 100644
index 000000000..5df503680
--- /dev/null
+++ b/packages/Webkul/Webhook/src/Validators/SafeWebhookUrl.php
@@ -0,0 +1,199 @@
+<?php
+
+namespace Webkul\Webhook\Validators... | [
"packages/Webkul/Webhook/src/Validators/SafeWebhookUrl.php"
] | [
{
"comment": "The IPv6 multicast check `stripos($ip, 'ff') === 0` operates on the raw string and matches any IPv6 literal whose textual form starts with the two characters `ff`, regardless of canonical form. For example, `ff::1` is the address `00ff:0000:…:0001` (first byte `0x00`, not multicast), but `stripos(... | true | ||
unopim/unopim | 451 | comment_to_fix | chore(webhook): harden webhook URL validation and dispatch [v2.0 LTS] | The docblock references `WebhookSettingsController::testWebhookUrl` and `WebhookService::sendDeletedToWebhook`, but neither method exists in the repository. The actual dispatch sinks are `WebhookService::sendDataToWebhook`, `sendCreatedToWebhook`, and `sendBatch`. Please update the list so future readers don't try to l... | 9ce2e8aaf68e0e69583a313d4b8ac1d1c6c3bcbc | e1d98ae3fe82ce2b254c0666113b68723f6550d9 | diff --git a/packages/Webkul/Webhook/src/Validators/SafeWebhookUrl.php b/packages/Webkul/Webhook/src/Validators/SafeWebhookUrl.php
new file mode 100644
index 000000000..5df503680
--- /dev/null
+++ b/packages/Webkul/Webhook/src/Validators/SafeWebhookUrl.php
@@ -0,0 +1,199 @@
+<?php
+
+namespace Webkul\Webhook\Validators... | [
"packages/Webkul/Webhook/src/Validators/SafeWebhookUrl.php"
] | [
{
"comment": "The docblock references `WebhookSettingsController::testWebhookUrl` and `WebhookService::sendDeletedToWebhook`, but neither method exists in the repository. The actual dispatch sinks are `WebhookService::sendDataToWebhook`, `sendCreatedToWebhook`, and `sendBatch`. Please update the list so future ... | true | ||
unopim/unopim | 451 | comment_to_fix | chore(webhook): harden webhook URL validation and dispatch [v2.0 LTS] | `dns_get_record($host, DNS_AAAA)` only returns IPv6 records, but `gethostbynamel()` returns IPv4 records. If the host has only AAAA records (IPv6-only) and `gethostbynamel` returns `false`, the merge still works. However, a stronger issue: `dns_get_record` can return CNAME/intermediate records depending on resolver beh... | 9ce2e8aaf68e0e69583a313d4b8ac1d1c6c3bcbc | e1d98ae3fe82ce2b254c0666113b68723f6550d9 | diff --git a/packages/Webkul/Webhook/src/Validators/SafeWebhookUrl.php b/packages/Webkul/Webhook/src/Validators/SafeWebhookUrl.php
new file mode 100644
index 000000000..5df503680
--- /dev/null
+++ b/packages/Webkul/Webhook/src/Validators/SafeWebhookUrl.php
@@ -0,0 +1,199 @@
+<?php
+
+namespace Webkul\Webhook\Validators... | [
"packages/Webkul/Webhook/src/Validators/SafeWebhookUrl.php"
] | [
{
"comment": "`dns_get_record($host, DNS_AAAA)` only returns IPv6 records, but `gethostbynamel()` returns IPv4 records. If the host has only AAAA records (IPv6-only) and `gethostbynamel` returns `false`, the merge still works. However, a stronger issue: `dns_get_record` can return CNAME/intermediate records dep... | true | ||
unopim/unopim | 451 | comment_to_fix | chore(webhook): harden webhook URL validation and dispatch [v2.0 LTS] | This SSRF mitigation has a TOCTOU (time-of-check / time-of-use) gap: `SafeWebhookUrl::validate()` resolves the hostname here, but `Http::post()` on the next line performs an independent DNS lookup when the connection is made. A malicious DNS server can return a public IP for the first lookup and a private/internal IP (... | 9ce2e8aaf68e0e69583a313d4b8ac1d1c6c3bcbc | e1d98ae3fe82ce2b254c0666113b68723f6550d9 | diff --git a/packages/Webkul/Webhook/src/Services/WebhookService.php b/packages/Webkul/Webhook/src/Services/WebhookService.php
index e3f9a4816..651fc0526 100644
--- a/packages/Webkul/Webhook/src/Services/WebhookService.php
+++ b/packages/Webkul/Webhook/src/Services/WebhookService.php
@@ -4,11 +4,13 @@
use Illuminate... | [
"packages/Webkul/Webhook/src/Services/WebhookService.php"
] | [
{
"comment": "This SSRF mitigation has a TOCTOU (time-of-check / time-of-use) gap: `SafeWebhookUrl::validate()` resolves the hostname here, but `Http::post()` on the next line performs an independent DNS lookup when the connection is made. A malicious DNS server can return a public IP for the first lookup and a... | true | ||
unopim/unopim | 471 | issue_to_patch | fix(ci): remove empty ${{ }} breaking Docker Publish on 2.1 | ## Problem
The `release: published` event has not been dispatching **Docker Publish** since v2.1.0. Every release on the 2.1 line (v2.1.1, **v2.1.2**, v2.0.x, v1.0.1) produced **zero** release-event runs — only an instant 0-second *"workflow file issue"* failure on the tag commit. No Docker image was built/pushed and ... | fe442e66664ef65939934dac2320dd276fa0622b | 03b04c4c19444ef12ed9ccc1c3a2378d1f3c01cf | diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml
index c648b866e..22daafc7e 100644
--- a/.github/workflows/docker-publish.yml
+++ b/.github/workflows/docker-publish.yml
@@ -48,7 +48,7 @@ jobs:
RELEASE_TAG: ${{ github.event.release.tag_name }}
INPUT_TAG: ${{ ... | [
".github/workflows/docker-publish.yml"
] | [] | true | ||
unopim/unopim | 470 | issue_to_patch | Clarify DB table prefix guidance to avoid Laravel double-prefixing | The reviewed guidance around `wk_` table naming was overly absolute and could mislead contributors. This updates the instruction to reflect Laravel behavior when a DB connection `prefix` is configured.
- **Problem context**
- The prior wording implied `wk_` should always be hardcoded in table names, which conflicts ... | cf9be94f70bcdfb450bdeae12e7fac1b04b321e9 | fa46c963867503548df93e3d34d744da115c9f40 | diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
index e7363b0d4..24e8311f6 100644
--- a/.github/copilot-instructions.md
+++ b/.github/copilot-instructions.md
@@ -16,16 +16,15 @@ modules**. Unopim is a Webkul Laravel 12 PIM — it is NOT Bagisto.
## Non-negotiable Conventions
-### 1. Ta... | [
".github/copilot-instructions.md"
] | [
{
"comment": "The “Correct” snippet is missing a semicolon after the `DB::table(...)` statement, which makes the example invalid PHP and slightly undermines the guidance.",
"path": ".github/copilot-instructions.md",
"hunk": "@@ -16,16 +16,15 @@ modules**. Unopim is a Webkul Laravel 12 PIM — it is NOT Ba... | true | ||
unopim/unopim | 472 | issue_to_patch | Release v2.0.3 — installer & ACL security hardening | Backports the security hardening from master into the 2.0.x line and cuts v2.0.3.
### Changes
- **Security** — seal installer endpoints after install completes (pre-auth admin-takeover guard) (#459)
- **Security** — enforce ACL permission checks on unmapped state-changing admin routes (integrations, bulk-edit, com... | 221fba4b0e1914f097bacb351c97685707f89645 | fb08214899df12480175f54ce30a7eab034a6cea | diff --git a/CHANGELOG.md b/CHANGELOG.md
index a887a60b4..9e10c4319 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,15 @@
# v2.0.x
+## v2.0.3 - 2026-06-04
+
+### Security
+- Sealed the installer once setup completes — the `CanInstall` middleware now blocks every `/install` request after a `storage/installed`... | [
".github/workflows/playwright_test.yml",
"CHANGELOG.md",
"packages/Webkul/Attribute/src/Database/Factories/AttributeFactory.php",
"packages/Webkul/Category/src/Database/Factories/CategoryFactory.php",
"packages/Webkul/Category/src/Database/Factories/CategoryFieldFactory.php",
"packages/Webkul/Category/src... | [
{
"comment": "The version string is interpolated into a RegExp but only dots are escaped. If Core::VERSION ever includes other regex metacharacters (e.g. \"+\" in build metadata), this pattern will break and can produce false failures. Escape the entire version string before building the RegExp.",
"path": "... | diff --git a/.github/workflows/playwright_test.yml b/.github/workflows/playwright_test.yml
index 7d0ade323..a2b53be5e 100644
--- a/.github/workflows/playwright_test.yml
+++ b/.github/workflows/playwright_test.yml
@@ -112,6 +112,11 @@ jobs:
sed -i "s|^\(DB_DATABASE=\s*\).*$|\1unopim|" .env
sed -i "... | true | |
unopim/unopim | 472 | comment_to_fix | Release v2.0.3 — installer & ACL security hardening | The version string is interpolated into a RegExp but only dots are escaped. If Core::VERSION ever includes other regex metacharacters (e.g. "+" in build metadata), this pattern will break and can produce false failures. Escape the entire version string before building the RegExp. | 221fba4b0e1914f097bacb351c97685707f89645 | fb08214899df12480175f54ce30a7eab034a6cea | diff --git a/tests/e2e-pw/tests/03-dashboard/versionCheck.spec.js b/tests/e2e-pw/tests/03-dashboard/versionCheck.spec.js
index 0fcfa6afc..f5bd82e33 100644
--- a/tests/e2e-pw/tests/03-dashboard/versionCheck.spec.js
+++ b/tests/e2e-pw/tests/03-dashboard/versionCheck.spec.js
@@ -1,4 +1,15 @@
const { test, expect } = requ... | [
"tests/e2e-pw/tests/03-dashboard/versionCheck.spec.js"
] | [
{
"comment": "The version string is interpolated into a RegExp but only dots are escaped. If Core::VERSION ever includes other regex metacharacters (e.g. \"+\" in build metadata), this pattern will break and can produce false failures. Escape the entire version string before building the RegExp.",
"path": "... | true | ||
unopim/unopim | 472 | comment_to_fix | Release v2.0.3 — installer & ACL security hardening | `tempnam()` can return `false` (e.g. if the temp dir isn't writable). Using the result unvalidated and suppressing errors with `@unlink()` can mask failures and later trigger `TypeError` when `file_exists()` is called with a non-string. Assert `tempnam()` succeeded and remove error suppression. | 221fba4b0e1914f097bacb351c97685707f89645 | fb08214899df12480175f54ce30a7eab034a6cea | diff --git a/packages/Webkul/Installer/tests/Feature/InstallerSecurityTest.php b/packages/Webkul/Installer/tests/Feature/InstallerSecurityTest.php
index f9ad13aca..cb1b64ee5 100644
--- a/packages/Webkul/Installer/tests/Feature/InstallerSecurityTest.php
+++ b/packages/Webkul/Installer/tests/Feature/InstallerSecurityTest... | [
"packages/Webkul/Installer/tests/Feature/InstallerSecurityTest.php"
] | [
{
"comment": "`tempnam()` can return `false` (e.g. if the temp dir isn't writable). Using the result unvalidated and suppressing errors with `@unlink()` can mask failures and later trigger `TypeError` when `file_exists()` is called with a non-string. Assert `tempnam()` succeeded and remove error suppression.",
... | true | ||
unopim/unopim | 472 | comment_to_fix | Release v2.0.3 — installer & ACL security hardening | Since `file_exists($this->marker)` is already guarding the call, error suppression on `unlink()` isn’t needed here and can hide real filesystem problems during the test run. | 221fba4b0e1914f097bacb351c97685707f89645 | fb08214899df12480175f54ce30a7eab034a6cea | diff --git a/packages/Webkul/Installer/tests/Feature/InstallerSecurityTest.php b/packages/Webkul/Installer/tests/Feature/InstallerSecurityTest.php
index f9ad13aca..cb1b64ee5 100644
--- a/packages/Webkul/Installer/tests/Feature/InstallerSecurityTest.php
+++ b/packages/Webkul/Installer/tests/Feature/InstallerSecurityTest... | [
"packages/Webkul/Installer/tests/Feature/InstallerSecurityTest.php"
] | [
{
"comment": "Since `file_exists($this->marker)` is already guarding the call, error suppression on `unlink()` isn’t needed here and can hide real filesystem problems during the test run.",
"path": "packages/Webkul/Installer/tests/Feature/InstallerSecurityTest.php",
"hunk": "@@ -8,16 +8,16 @@\n conf... | true | ||
unopim/unopim | 472 | comment_to_fix | Release v2.0.3 — installer & ACL security hardening | Same as the other installer tests: `tempnam()` can return `false` and `@unlink()` hides failures. Add an assertion that the temp path was created and avoid error suppression so failures are visible. | 221fba4b0e1914f097bacb351c97685707f89645 | fb08214899df12480175f54ce30a7eab034a6cea | diff --git a/packages/Webkul/Installer/tests/Feature/InstallerMarkInstalledTest.php b/packages/Webkul/Installer/tests/Feature/InstallerMarkInstalledTest.php
index f400f0668..6e7c0f15d 100644
--- a/packages/Webkul/Installer/tests/Feature/InstallerMarkInstalledTest.php
+++ b/packages/Webkul/Installer/tests/Feature/Instal... | [
"packages/Webkul/Installer/tests/Feature/InstallerMarkInstalledTest.php"
] | [
{
"comment": "Same as the other installer tests: `tempnam()` can return `false` and `@unlink()` hides failures. Add an assertion that the temp path was created and avoid error suppression so failures are visible.",
"path": "packages/Webkul/Installer/tests/Feature/InstallerMarkInstalledTest.php",
"hunk":... | true | ||
unopim/unopim | 472 | comment_to_fix | Release v2.0.3 — installer & ACL security hardening | `file_exists($this->marker)` already guards this call, so suppressing errors on `unlink()` can hide real cleanup problems and make failures harder to diagnose. | 221fba4b0e1914f097bacb351c97685707f89645 | fb08214899df12480175f54ce30a7eab034a6cea | diff --git a/packages/Webkul/Installer/tests/Feature/InstallerMarkInstalledTest.php b/packages/Webkul/Installer/tests/Feature/InstallerMarkInstalledTest.php
index f400f0668..6e7c0f15d 100644
--- a/packages/Webkul/Installer/tests/Feature/InstallerMarkInstalledTest.php
+++ b/packages/Webkul/Installer/tests/Feature/Instal... | [
"packages/Webkul/Installer/tests/Feature/InstallerMarkInstalledTest.php"
] | [
{
"comment": "`file_exists($this->marker)` already guards this call, so suppressing errors on `unlink()` can hide real cleanup problems and make failures harder to diagnose.",
"path": "packages/Webkul/Installer/tests/Feature/InstallerMarkInstalledTest.php",
"hunk": "@@ -4,16 +4,16 @@\n use Webkul\\Insta... | true | ||
unopim/unopim | 472 | comment_to_fix | Release v2.0.3 — installer & ACL security hardening | The installed-marker path expression is repeated and uses `??` with extra parentheses. Using Laravel's `config()` default parameter makes this clearer and keeps the marker-path logic consistent everywhere. | 221fba4b0e1914f097bacb351c97685707f89645 | fb08214899df12480175f54ce30a7eab034a6cea | diff --git a/packages/Webkul/Installer/src/Http/Middleware/CanInstall.php b/packages/Webkul/Installer/src/Http/Middleware/CanInstall.php
index 68d6775d5..fe0a78cb4 100644
--- a/packages/Webkul/Installer/src/Http/Middleware/CanInstall.php
+++ b/packages/Webkul/Installer/src/Http/Middleware/CanInstall.php
@@ -38,7 +38,7 ... | [
"packages/Webkul/Installer/src/Http/Middleware/CanInstall.php"
] | [
{
"comment": "The installed-marker path expression is repeated and uses `??` with extra parentheses. Using Laravel's `config()` default parameter makes this clearer and keeps the marker-path logic consistent everywhere.",
"path": "packages/Webkul/Installer/src/Http/Middleware/CanInstall.php",
"hunk": "@... | true | ||
unopim/unopim | 472 | comment_to_fix | Release v2.0.3 — installer & ACL security hardening | Same as above: prefer `config('installer.installed_marker', storage_path('installed'))` to avoid repeating the null-coalescing expression and to keep the marker lookup consistent. | 221fba4b0e1914f097bacb351c97685707f89645 | fb08214899df12480175f54ce30a7eab034a6cea | diff --git a/packages/Webkul/Installer/src/Http/Middleware/CanInstall.php b/packages/Webkul/Installer/src/Http/Middleware/CanInstall.php
index 68d6775d5..fe0a78cb4 100644
--- a/packages/Webkul/Installer/src/Http/Middleware/CanInstall.php
+++ b/packages/Webkul/Installer/src/Http/Middleware/CanInstall.php
@@ -38,7 +38,7 ... | [
"packages/Webkul/Installer/src/Http/Middleware/CanInstall.php"
] | [
{
"comment": "Same as above: prefer `config('installer.installed_marker', storage_path('installed'))` to avoid repeating the null-coalescing expression and to keep the marker lookup consistent.",
"path": "packages/Webkul/Installer/src/Http/Middleware/CanInstall.php",
"hunk": "@@ -48,7 +48,7 @@ public fu... | true | ||
unopim/unopim | 472 | comment_to_fix | Release v2.0.3 — installer & ACL security hardening | The installed-marker path is computed inline multiple times in this method. Assign it once using `config('installer.installed_marker', storage_path('installed'))` so the file path and the existence check can’t accidentally diverge in future edits. | 221fba4b0e1914f097bacb351c97685707f89645 | fb08214899df12480175f54ce30a7eab034a6cea | diff --git a/packages/Webkul/Installer/src/Console/Commands/Installer.php b/packages/Webkul/Installer/src/Console/Commands/Installer.php
index db4087725..41b4bdba4 100644
--- a/packages/Webkul/Installer/src/Console/Commands/Installer.php
+++ b/packages/Webkul/Installer/src/Console/Commands/Installer.php
@@ -162,11 +162... | [
"packages/Webkul/Installer/src/Console/Commands/Installer.php"
] | [
{
"comment": "The installed-marker path is computed inline multiple times in this method. Assign it once using `config('installer.installed_marker', storage_path('installed'))` so the file path and the existence check can’t accidentally diverge in future edits.",
"path": "packages/Webkul/Installer/src/Conso... | true | ||
unopim/unopim | 466 | issue_to_patch | docs(agents): update AI agent instructions from Laravel 11 to Laravel 12 / PHP 8.3 | Updates six agent-instruction files (read by Copilot, Kilo Code, Claude Code, Cursor, and Codex at session start) to match the project's actual framework version.
composer.json requires:
- "php": "^8.3"
- "laravel/framework": "^12.0"
But these docs still say Laravel 11 and PHP 8.1+. AI agents applying Laravel 11 ... | 3e894245ee4238f6114c80226e7dde51ac50cd15 | 77abf71e5297dddb0514bd90cdc8e207199c611f | diff --git a/.github/code-generation-instructions.md b/.github/code-generation-instructions.md
index 1a1946a64..49395e797 100644
--- a/.github/code-generation-instructions.md
+++ b/.github/code-generation-instructions.md
@@ -1,13 +1,13 @@
# Unopim Connector — Code Generation Instructions
-Follow these guidelines whe... | [
".github/code-generation-instructions.md",
".github/code-review-instructions.md",
".github/copilot-instructions.md",
"AGENTS.md",
"code-generation-instructions.md",
"code-review-instructions.md"
] | [
{
"comment": "The text implies Laravel always prepends `DB_PREFIX` automatically. In Laravel this behavior depends on the configured database connection `prefix` (typically `config/database.php` -> connections.*.prefix). To avoid a misleading blanket statement, consider rewording to explicitly tie the behavior ... | true | ||
unopim/unopim | 466 | comment_to_fix | docs(agents): update AI agent instructions from Laravel 11 to Laravel 12 / PHP 8.3 | The text implies Laravel always prepends `DB_PREFIX` automatically. In Laravel this behavior depends on the configured database connection `prefix` (typically `config/database.php` -> connections.*.prefix). To avoid a misleading blanket statement, consider rewording to explicitly tie the behavior to the DB connection p... | 3e894245ee4238f6114c80226e7dde51ac50cd15 | 77abf71e5297dddb0514bd90cdc8e207199c611f | diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
index d9be723b8..e7363b0d4 100644
--- a/.github/copilot-instructions.md
+++ b/.github/copilot-instructions.md
@@ -1,14 +1,14 @@
# GitHub Copilot Workspace Instructions: Unopim Connector Development
This workspace contains agent skills fo... | [
".github/copilot-instructions.md"
] | [
{
"comment": "The text implies Laravel always prepends `DB_PREFIX` automatically. In Laravel this behavior depends on the configured database connection `prefix` (typically `config/database.php` -> connections.*.prefix). To avoid a misleading blanket statement, consider rewording to explicitly tie the behavior ... | true | ||
unopim/unopim | 466 | comment_to_fix | docs(agents): update AI agent instructions from Laravel 11 to Laravel 12 / PHP 8.3 | The PHP example is not valid as written (missing semicolons and/or a terminating call like `->get()`), which makes it easy to copy/paste into broken code. Suggest updating the snippet to syntactically valid PHP statements (e.g., add semicolons or show a complete chain) while keeping the same “correct vs wrong” intent. | 3e894245ee4238f6114c80226e7dde51ac50cd15 | 77abf71e5297dddb0514bd90cdc8e207199c611f | diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
index d9be723b8..e7363b0d4 100644
--- a/.github/copilot-instructions.md
+++ b/.github/copilot-instructions.md
@@ -1,14 +1,14 @@
# GitHub Copilot Workspace Instructions: Unopim Connector Development
This workspace contains agent skills fo... | [
".github/copilot-instructions.md"
] | [
{
"comment": "The PHP example is not valid as written (missing semicolons and/or a terminating call like `->get()`), which makes it easy to copy/paste into broken code. Suggest updating the snippet to syntactically valid PHP statements (e.g., add semicolons or show a complete chain) while keeping the same “corr... | true | ||
unopim/unopim | 473 | issue_to_patch | chore(release): v2.1.3 — installer & ACL security hardening, AppUrlGuard | Backports the security hardening from master into the 2.1.x line and cuts v2.1.3.
### Changes
- **Security** — seal installer endpoints after install completes (pre-auth admin-takeover guard) (#459)
- **Security** — enforce ACL permission checks on unmapped state-changing admin routes (integrations, bulk-edit, com... | fe442e66664ef65939934dac2320dd276fa0622b | 74e1259b56dc1eb10143e40dc5ab90e77a48f752 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index d56a87a4a..a9230be38 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,13 +1,21 @@
# v2.1.x
+## v2.1.3 - 2026-06-04
+
+### Security
+- Sealed the installer once setup completes — the `CanInstall` middleware now blocks every `/install` request after a `storage/installed... | [
"CHANGELOG.md",
"packages/Webkul/Core/src/Core.php"
] | [] | true | ||
unopim/unopim | 461 | issue_to_patch | [2.0] Harden installer: seal /install routes and endpoints once installed | ## Issue Reference
<!-- Please mention issue #id or use a comma if your pull request solves multiple issues. -->
Backport of the installer hardening to the 2.0 branch.
## Description
<!-- Please describe your changes in detail. -->
Tightens installer access control so `/install` routes and their API endpoints ca... | c9016744375329bf63804944561bfc0eab21b808 | b3a81a9ddccbb0b7f9ce3674f98ffe229ef4f51e | diff --git a/packages/Webkul/Installer/src/Console/Commands/Installer.php b/packages/Webkul/Installer/src/Console/Commands/Installer.php
index ffcd0347c..db4087725 100644
--- a/packages/Webkul/Installer/src/Console/Commands/Installer.php
+++ b/packages/Webkul/Installer/src/Console/Commands/Installer.php
@@ -152,9 +152,... | [
"packages/Webkul/Installer/src/Console/Commands/Installer.php",
"packages/Webkul/Installer/src/Http/Controllers/InstallerController.php",
"packages/Webkul/Installer/src/Http/Middleware/CanInstall.php",
"packages/Webkul/Installer/src/Resources/views/installer/index.blade.php",
"packages/Webkul/Installer/test... | [] | diff --git a/packages/Webkul/Installer/tests/Feature/InstallerMarkInstalledTest.php b/packages/Webkul/Installer/tests/Feature/InstallerMarkInstalledTest.php
new file mode 100644
index 000000000..f400f0668
--- /dev/null
+++ b/packages/Webkul/Installer/tests/Feature/InstallerMarkInstalledTest.php
@@ -0,0 +1,60 @@
+<?php
... | true | |
unopim/unopim | 458 | issue_to_patch | Fix: Import validation error font color visibility in dark mode | ### Issue
On the Import Job Tracker (Data Transfer → Job Tracker → Products Import),
validation error text used `text-red-600` with no dark-mode variant, blending into
the dark `dark:bg-red-900/20` background and making errors hard to read.
### Fix
- Added `dark:text-red-400` to the validation error list so err... | 7ee7c2a18c1680d133afe7353fd5f32fd2c33e3a | 4840a441ce6282f11a4c1e72be8216021548811f | diff --git a/packages/Webkul/Admin/src/Resources/assets/images/favicon.svg b/packages/Webkul/Admin/src/Resources/assets/images/favicon.svg
index 242c11738..4964e34fd 100644
--- a/packages/Webkul/Admin/src/Resources/assets/images/favicon.svg
+++ b/packages/Webkul/Admin/src/Resources/assets/images/favicon.svg
@@ -1,11 +1... | [
"packages/Webkul/Admin/src/Resources/assets/images/favicon.svg",
"packages/Webkul/Admin/src/Resources/assets/images/square-logo.svg",
"packages/Webkul/Admin/src/Resources/views/settings/data-transfer/tracker/import.blade.php",
"public/themes/admin/default/build/assets/app-BKZ8tkMb.js",
"public/themes/admin/... | [
{
"comment": "`v-for` on the validation error list is missing a `:key`, which can cause Vue warnings and less predictable DOM diffing. Other loops in this template already use keys (e.g. summary loop), so it would be good to align here as well.",
"path": "packages/Webkul/Admin/src/Resources/views/settings/d... | true | ||
unopim/unopim | 458 | comment_to_fix | Fix: Import validation error font color visibility in dark mode | `v-for` on the validation error list is missing a `:key`, which can cause Vue warnings and less predictable DOM diffing. Other loops in this template already use keys (e.g. summary loop), so it would be good to align here as well. | 7ee7c2a18c1680d133afe7353fd5f32fd2c33e3a | 4840a441ce6282f11a4c1e72be8216021548811f | diff --git a/packages/Webkul/Admin/src/Resources/views/settings/data-transfer/tracker/import.blade.php b/packages/Webkul/Admin/src/Resources/views/settings/data-transfer/tracker/import.blade.php
index 4962a362c..768c489e5 100644
--- a/packages/Webkul/Admin/src/Resources/views/settings/data-transfer/tracker/import.blade... | [
"packages/Webkul/Admin/src/Resources/views/settings/data-transfer/tracker/import.blade.php"
] | [
{
"comment": "`v-for` on the validation error list is missing a `:key`, which can cause Vue warnings and less predictable DOM diffing. Other loops in this template already use keys (e.g. summary loop), so it would be good to align here as well.",
"path": "packages/Webkul/Admin/src/Resources/views/settings/d... | true | ||
unopim/unopim | 463 | issue_to_patch | [Backport 2.0] fix(installer): remove hardcoded admin default credentials & make seeders idempotent | Backport of #457 to release/2.0.2. Core security fix + tests only. | 2ce7e23320c761075e4435d7082e5f49658548be | a363783720df59d40b647848e4251a477bed47cb | diff --git a/.env.example b/.env.example
index ccf14be59..c23194042 100644
--- a/.env.example
+++ b/.env.example
@@ -5,6 +5,13 @@ APP_DEBUG=true
APP_URL=http://localhost:8000
APP_ADMIN_URL=admin
+# Initial admin (used by AdminsTableSeeder on first boot only).
+# Leave blank to auto-generate a random password and wr... | [
".env.example",
"packages/Webkul/Installer/src/Database/Seeders/User/AdminsTableSeeder.php",
"packages/Webkul/Installer/src/Database/Seeders/User/RolesTableSeeder.php",
"packages/Webkul/Installer/tests/Feature/AdminsTableSeederSecurityTest.php",
"packages/Webkul/Installer/tests/Feature/RolesTableSeederIdemp... | [] | diff --git a/packages/Webkul/Installer/tests/Feature/AdminsTableSeederSecurityTest.php b/packages/Webkul/Installer/tests/Feature/AdminsTableSeederSecurityTest.php
new file mode 100644
index 000000000..4630e6baa
--- /dev/null
+++ b/packages/Webkul/Installer/tests/Feature/AdminsTableSeederSecurityTest.php
@@ -0,0 +1,136 ... | true | |
unopim/unopim | 464 | issue_to_patch | [2.0] feat: add debug-only APP_URL mismatch guard (AppUrlGuard) | ## Issue Reference
Backport of the AppUrlGuard (APP_URL mismatch warning) feature.
## Description
Adds a **debug-only** developer guard that warns when the browser host/port differs from `APP_URL`, which otherwise causes silently broken admin assets and redirects to an unreachable host.
- New self-contained `We... | c9016744375329bf63804944561bfc0eab21b808 | 00f3d83c6e9b17f8b0f89396bb4a9f857e73abb8 | diff --git a/bootstrap/providers.php b/bootstrap/providers.php
index 9c3988334..5e331b080 100644
--- a/bootstrap/providers.php
+++ b/bootstrap/providers.php
@@ -11,6 +11,7 @@
use Webkul\Admin\Providers\AdminServiceProvider;
use Webkul\AdminApi\Providers\AdminApiServiceProvider;
use Webkul\AiAgent\Providers\AiAgentSe... | [
"bootstrap/providers.php",
"composer.json",
"packages/Webkul/AppUrlGuard/src/Concerns/NormalizesUrl.php",
"packages/Webkul/AppUrlGuard/src/Http/Controllers/AppUrlGuardController.php",
"packages/Webkul/AppUrlGuard/src/Http/Middleware/VerifyAppUrlMatches.php",
"packages/Webkul/AppUrlGuard/src/Providers/AppU... | [] | diff --git a/packages/Webkul/AppUrlGuard/tests/Feature/AppUrlGuardEndpointTest.php b/packages/Webkul/AppUrlGuard/tests/Feature/AppUrlGuardEndpointTest.php
new file mode 100644
index 000000000..99cf4b3f7
--- /dev/null
+++ b/packages/Webkul/AppUrlGuard/tests/Feature/AppUrlGuardEndpointTest.php
@@ -0,0 +1,228 @@
+<?php
+
... | true | |
unopim/unopim | 465 | issue_to_patch | [2.1] feat: add debug-only APP_URL mismatch guard (AppUrlGuard) | ## Issue Reference
Backport of the AppUrlGuard (APP_URL mismatch warning) feature.
## Description
Adds a **debug-only** developer guard that warns when the browser host/port differs from `APP_URL`, which otherwise causes silently broken admin assets and redirects to an unreachable host.
- New self-contained `We... | 3e894245ee4238f6114c80226e7dde51ac50cd15 | ace2732c8ab2bbc923b88bbdd4dc424ce3b2c7d8 | diff --git a/bootstrap/providers.php b/bootstrap/providers.php
index 3510bd1d8..567ce034b 100644
--- a/bootstrap/providers.php
+++ b/bootstrap/providers.php
@@ -3,6 +3,7 @@
use Webkul\Admin\Providers\AdminServiceProvider;
use Webkul\AdminApi\Providers\AdminApiServiceProvider;
use Webkul\AiAgent\Providers\AiAgentServ... | [
"bootstrap/providers.php",
"composer.json",
"packages/Webkul/AppUrlGuard/src/Concerns/NormalizesUrl.php",
"packages/Webkul/AppUrlGuard/src/Http/Controllers/AppUrlGuardController.php",
"packages/Webkul/AppUrlGuard/src/Http/Middleware/VerifyAppUrlMatches.php",
"packages/Webkul/AppUrlGuard/src/Providers/AppU... | [] | diff --git a/packages/Webkul/AppUrlGuard/tests/Feature/AppUrlGuardEndpointTest.php b/packages/Webkul/AppUrlGuard/tests/Feature/AppUrlGuardEndpointTest.php
new file mode 100644
index 000000000..99cf4b3f7
--- /dev/null
+++ b/packages/Webkul/AppUrlGuard/tests/Feature/AppUrlGuardEndpointTest.php
@@ -0,0 +1,228 @@
+<?php
+
... | true | |
unopim/unopim | 468 | issue_to_patch | Enforce ACL permission checks on state-changing admin routes (2.1 backport) | Backport of #467
The Bouncer middleware only enforces a permission when the route name is
present in the ACL map (`config/acl.php`). Several state-changing routes were
missing from that map, so they were not covered by any permission check and
were reachable by any authenticated admin regardless of role.
Adds t... | c4d3941488e9681eaa3aff16ac4a12a635bc5bee | b250f16cedcaec4ab799581e12f5fb3f9ba100df | diff --git a/packages/Webkul/Admin/src/Config/acl.php b/packages/Webkul/Admin/src/Config/acl.php
index 8efde8694..5c12d83be 100755
--- a/packages/Webkul/Admin/src/Config/acl.php
+++ b/packages/Webkul/Admin/src/Config/acl.php
@@ -70,6 +70,41 @@
'name' => 'admin::app.acl.mass-delete',
'route' => 'admin... | [
"packages/Webkul/Admin/src/Config/acl.php",
"packages/Webkul/Admin/tests/Feature/Acl/WriteRouteBypassRegressionTest.php"
] | [] | diff --git a/packages/Webkul/Admin/tests/Feature/Acl/WriteRouteBypassRegressionTest.php b/packages/Webkul/Admin/tests/Feature/Acl/WriteRouteBypassRegressionTest.php
index 93d5a53ca..463665efe 100644
--- a/packages/Webkul/Admin/tests/Feature/Acl/WriteRouteBypassRegressionTest.php
+++ b/packages/Webkul/Admin/tests/Featur... | true | |
unopim/unopim | 469 | issue_to_patch | Enforce ACL permission checks on state-changing admin routes (2.0 backport) | Backport of #467
The Bouncer middleware only enforces a permission when the route name is
present in the ACL map (`config/acl.php`). Several state-changing routes were
missing from that map, so they were reachable by any authenticated admin
regardless of role.
Adds the missing route -> permission mappings in ... | c9016744375329bf63804944561bfc0eab21b808 | 353473065a7a9817043a3e481aa3a3745740e112 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b542cdcc6..a887a60b4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
# v2.0.x
+## v2.0.2 - 2026-05-29
+
+### Improvements
+- Hardened **webhook URL handling** — webhook target URLs are now validated to ensure they resolve to a publicly reachable host befor... | [
"CHANGELOG.md",
"packages/Webkul/Admin/src/Config/acl.php",
"packages/Webkul/Admin/tests/Feature/Acl/WriteRouteBypassRegressionTest.php",
"packages/Webkul/Core/src/Core.php",
"tests/e2e-pw/tests/03-dashboard/versionCheck.spec.js"
] | [] | diff --git a/packages/Webkul/Admin/tests/Feature/Acl/WriteRouteBypassRegressionTest.php b/packages/Webkul/Admin/tests/Feature/Acl/WriteRouteBypassRegressionTest.php
index 62a0d5265..5cd73e117 100644
--- a/packages/Webkul/Admin/tests/Feature/Acl/WriteRouteBypassRegressionTest.php
+++ b/packages/Webkul/Admin/tests/Featur... | true | |
unopim/unopim | 462 | issue_to_patch | [Backport 2.1] fix(installer): remove hardcoded admin default credentials & make seeders idempotent | Backport of #457 to the release/2.1.2 line.
### What
- The installer no longer seeds the admin with a known default password.
Operators set `INSTALLER_ADMIN_EMAIL` / `INSTALLER_ADMIN_PASSWORD`; if left
blank, a random password is generated and written once to
`storage/app/admin-credentials.txt` (read it, l... | 3e894245ee4238f6114c80226e7dde51ac50cd15 | 6b94e7843526970939b35f002203ffc36691778e | diff --git a/.env.example b/.env.example
index ccf14be59..c23194042 100644
--- a/.env.example
+++ b/.env.example
@@ -5,6 +5,13 @@ APP_DEBUG=true
APP_URL=http://localhost:8000
APP_ADMIN_URL=admin
+# Initial admin (used by AdminsTableSeeder on first boot only).
+# Leave blank to auto-generate a random password and wr... | [
".env.example",
".github/workflows/playwright_test.yml",
"CHANGELOG.md",
"packages/Webkul/Installer/src/Database/Seeders/User/AdminsTableSeeder.php",
"packages/Webkul/Installer/src/Database/Seeders/User/RolesTableSeeder.php",
"packages/Webkul/Installer/tests/Feature/AdminsTableSeederSecurityTest.php",
"... | [] | diff --git a/.github/workflows/playwright_test.yml b/.github/workflows/playwright_test.yml
index 1d3a9c525..5c28fd0b2 100644
--- a/.github/workflows/playwright_test.yml
+++ b/.github/workflows/playwright_test.yml
@@ -120,6 +120,14 @@ jobs:
sed -i "s|^\(DB_PASSWORD=\s*\).*$|\1root|" .env
- name: Runn... | true | |
unopim/unopim | 460 | issue_to_patch | [2.1] Harden installer: seal /install routes and endpoints once installed | ## Issue Reference
<!-- Please mention issue #id or use a comma if your pull request solves multiple issues. -->
Backport of the installer hardening to the 2.1 branch.
## Description
<!-- Please describe your changes in detail. -->
Tightens installer access control so `/install` routes and their API endpoints ca... | 3e894245ee4238f6114c80226e7dde51ac50cd15 | 3fa945b75ebb3bffa646b1e092290f4f3849bae4 | diff --git a/dockerfiles/fpm-entrypoint.sh b/dockerfiles/fpm-entrypoint.sh
index 43dcfd141..7d968c220 100755
--- a/dockerfiles/fpm-entrypoint.sh
+++ b/dockerfiles/fpm-entrypoint.sh
@@ -106,6 +106,12 @@ else
fi
fi
+# ─── Seal the installer ─────────────────────────────────────────────
+INSTALLED_MARKER="/var/www... | [
"dockerfiles/fpm-entrypoint.sh",
"dockerfiles/web-entrypoint.sh",
"packages/Webkul/Installer/src/Console/Commands/Installer.php",
"packages/Webkul/Installer/src/Http/Controllers/InstallerController.php",
"packages/Webkul/Installer/src/Http/Middleware/CanInstall.php",
"packages/Webkul/Installer/src/Resourc... | [
{
"comment": "`markInstalled()` claims to dispatch `unopim.installed` exactly once even if two end-of-flow requests race, but the current `file_exists()` pre-check is not atomic. Two concurrent requests can both observe a missing marker, both write the file, and both dispatch the event.",
"path": "packages/... | diff --git a/packages/Webkul/Installer/tests/Feature/InstallerControllerTest.php b/packages/Webkul/Installer/tests/Feature/InstallerControllerTest.php
index 61b890b56..2ed8f7b74 100644
--- a/packages/Webkul/Installer/tests/Feature/InstallerControllerTest.php
+++ b/packages/Webkul/Installer/tests/Feature/InstallerContro... | true | |
unopim/unopim | 460 | comment_to_fix | [2.1] Harden installer: seal /install routes and endpoints once installed | `markInstalled()` claims to dispatch `unopim.installed` exactly once even if two end-of-flow requests race, but the current `file_exists()` pre-check is not atomic. Two concurrent requests can both observe a missing marker, both write the file, and both dispatch the event. | 3e894245ee4238f6114c80226e7dde51ac50cd15 | 3fa945b75ebb3bffa646b1e092290f4f3849bae4 | diff --git a/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php b/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php
index a9f2ee556..fdf514a73 100644
--- a/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php
+++ b/packages/Webkul/Installer/src/Http/Controllers... | [
"packages/Webkul/Installer/src/Http/Controllers/InstallerController.php"
] | [
{
"comment": "`markInstalled()` claims to dispatch `unopim.installed` exactly once even if two end-of-flow requests race, but the current `file_exists()` pre-check is not atomic. Two concurrent requests can both observe a missing marker, both write the file, and both dispatch the event.",
"path": "packages/... | true | ||
unopim/unopim | 460 | comment_to_fix | [2.1] Harden installer: seal /install routes and endpoints once installed | `seedSampleData()` marks the installer as installed *before* checking whether seeding succeeded. If seeding fails, the instance becomes sealed and the operator cannot retry the demo-data step (and `abortIfInstalled()` will start returning 403). The marker should only be written after a successful seed. | 3e894245ee4238f6114c80226e7dde51ac50cd15 | 3fa945b75ebb3bffa646b1e092290f4f3849bae4 | diff --git a/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php b/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php
index a9f2ee556..fdf514a73 100644
--- a/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php
+++ b/packages/Webkul/Installer/src/Http/Controllers... | [
"packages/Webkul/Installer/src/Http/Controllers/InstallerController.php"
] | [
{
"comment": "`seedSampleData()` marks the installer as installed *before* checking whether seeding succeeded. If seeding fails, the instance becomes sealed and the operator cannot retry the demo-data step (and `abortIfInstalled()` will start returning 403). The marker should only be written after a successful ... | true | ||
unopim/unopim | 460 | comment_to_fix | [2.1] Harden installer: seal /install routes and endpoints once installed | The JSON error response returns the raw exception message to an unauthenticated client. This can leak sensitive operational details (SQL, paths, configuration) in production. Prefer a generic message for the client and keep the full exception detail only in logs. | 3e894245ee4238f6114c80226e7dde51ac50cd15 | 3fa945b75ebb3bffa646b1e092290f4f3849bae4 | diff --git a/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php b/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php
index a9f2ee556..fdf514a73 100644
--- a/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php
+++ b/packages/Webkul/Installer/src/Http/Controllers... | [
"packages/Webkul/Installer/src/Http/Controllers/InstallerController.php"
] | [
{
"comment": "The JSON error response returns the raw exception message to an unauthenticated client. This can leak sensitive operational details (SQL, paths, configuration) in production. Prefer a generic message for the client and keep the full exception detail only in logs.",
"path": "packages/Webkul/Ins... | true | ||
unopim/unopim | 460 | comment_to_fix | [2.1] Harden installer: seal /install routes and endpoints once installed | This regression test describes an `X-Requested-With: XMLHttpRequest` bypass, but the request doesn't actually set that header. `postJson()` only sets JSON headers, so the test would still pass even if the old `! $request->ajax()` gating were reintroduced. | 3e894245ee4238f6114c80226e7dde51ac50cd15 | 3fa945b75ebb3bffa646b1e092290f4f3849bae4 | diff --git a/packages/Webkul/Installer/tests/Feature/InstallerSecurityTest.php b/packages/Webkul/Installer/tests/Feature/InstallerSecurityTest.php
new file mode 100644
index 000000000..1628a41be
--- /dev/null
+++ b/packages/Webkul/Installer/tests/Feature/InstallerSecurityTest.php
@@ -0,0 +1,166 @@
+<?php
+
+use Illumin... | [
"packages/Webkul/Installer/tests/Feature/InstallerSecurityTest.php"
] | [
{
"comment": "This regression test describes an `X-Requested-With: XMLHttpRequest` bypass, but the request doesn't actually set that header. `postJson()` only sets JSON headers, so the test would still pass even if the old `! $request->ajax()` gating were reintroduced.",
"path": "packages/Webkul/Installer/t... | true | ||
unopim/unopim | 460 | comment_to_fix | [2.1] Harden installer: seal /install routes and endpoints once installed | Same race condition as the controller: `markInstalled()` is not atomic, so two concurrent installer invocations could both dispatch `unopim.installed` despite the docblock claiming exactly-once behavior. | 3e894245ee4238f6114c80226e7dde51ac50cd15 | 3fa945b75ebb3bffa646b1e092290f4f3849bae4 | diff --git a/packages/Webkul/Installer/src/Console/Commands/Installer.php b/packages/Webkul/Installer/src/Console/Commands/Installer.php
index 9594da3f3..0df8b223d 100644
--- a/packages/Webkul/Installer/src/Console/Commands/Installer.php
+++ b/packages/Webkul/Installer/src/Console/Commands/Installer.php
@@ -157,9 +157,... | [
"packages/Webkul/Installer/src/Console/Commands/Installer.php"
] | [
{
"comment": "Same race condition as the controller: `markInstalled()` is not atomic, so two concurrent installer invocations could both dispatch `unopim.installed` despite the docblock claiming exactly-once behavior.",
"path": "packages/Webkul/Installer/src/Console/Commands/Installer.php",
"hunk": "@@ ... | true | ||
unopim/unopim | 467 | issue_to_patch | Enforce ACL permission checks on state-changing admin routes | ## Summary
The Bouncer middleware only enforces a permission when the current route
name exists in the ACL map (`config/acl.php` → `$acl->roles[]`). Several
state-changing routes were missing from that map, so they were not covered
by any permission check — they were reachable by any authenticated admin
regardle... | 7ee7c2a18c1680d133afe7353fd5f32fd2c33e3a | 63dc4dccb98b8923244b26bf4f306564e6c1636e | diff --git a/packages/Webkul/Admin/src/Config/acl.php b/packages/Webkul/Admin/src/Config/acl.php
index 8efde8694..5c12d83be 100755
--- a/packages/Webkul/Admin/src/Config/acl.php
+++ b/packages/Webkul/Admin/src/Config/acl.php
@@ -70,6 +70,41 @@
'name' => 'admin::app.acl.mass-delete',
'route' => 'admin... | [
"packages/Webkul/Admin/src/Config/acl.php",
"packages/Webkul/Admin/tests/Feature/Acl/WriteRouteBypassRegressionTest.php"
] | [] | diff --git a/packages/Webkul/Admin/tests/Feature/Acl/WriteRouteBypassRegressionTest.php b/packages/Webkul/Admin/tests/Feature/Acl/WriteRouteBypassRegressionTest.php
index 93d5a53ca..463665efe 100644
--- a/packages/Webkul/Admin/tests/Feature/Acl/WriteRouteBypassRegressionTest.php
+++ b/packages/Webkul/Admin/tests/Featur... | true | |
unopim/unopim | 459 | issue_to_patch | Harden installer state guards and seal install endpoints once installed | ## Description
<!-- Please describe your changes in detail. -->
Tightens the installer access controls so the `/install` routes and their API endpoints can no longer be reached once an instance is fully installed.
- `CanInstall` middleware now seals all `/install` requests once installation is complete, based sole... | 7ee7c2a18c1680d133afe7353fd5f32fd2c33e3a | 2c1c40dc9827aba8b5da20a098e000dc3488d2ea | diff --git a/dockerfiles/fpm-entrypoint.sh b/dockerfiles/fpm-entrypoint.sh
index 43dcfd141..7d968c220 100755
--- a/dockerfiles/fpm-entrypoint.sh
+++ b/dockerfiles/fpm-entrypoint.sh
@@ -106,6 +106,12 @@ else
fi
fi
+# ─── Seal the installer ─────────────────────────────────────────────
+INSTALLED_MARKER="/var/www... | [
"dockerfiles/fpm-entrypoint.sh",
"dockerfiles/web-entrypoint.sh",
"packages/Webkul/Installer/src/Console/Commands/Installer.php",
"packages/Webkul/Installer/src/Http/Controllers/InstallerController.php",
"packages/Webkul/Installer/src/Http/Middleware/CanInstall.php",
"packages/Webkul/Installer/src/Resourc... | [
{
"comment": "The comment says the completion marker is “only written by the final SMTP step”, but the current UI flow writes the marker at the end of admin creation (or after demo-data seeding). This is misleading documentation for why the middleware is safe for XHR requests.",
"path": "packages/Webkul/Ins... | diff --git a/packages/Webkul/Installer/tests/Feature/InstallerControllerTest.php b/packages/Webkul/Installer/tests/Feature/InstallerControllerTest.php
index 61b890b56..2ed8f7b74 100644
--- a/packages/Webkul/Installer/tests/Feature/InstallerControllerTest.php
+++ b/packages/Webkul/Installer/tests/Feature/InstallerContro... | true | |
unopim/unopim | 459 | comment_to_fix | Harden installer state guards and seal install endpoints once installed | The comment says the completion marker is “only written by the final SMTP step”, but the current UI flow writes the marker at the end of admin creation (or after demo-data seeding). This is misleading documentation for why the middleware is safe for XHR requests. | 7ee7c2a18c1680d133afe7353fd5f32fd2c33e3a | 2c1c40dc9827aba8b5da20a098e000dc3488d2ea | diff --git a/packages/Webkul/Installer/src/Http/Middleware/CanInstall.php b/packages/Webkul/Installer/src/Http/Middleware/CanInstall.php
index 83a77b782..0ed586a4b 100644
--- a/packages/Webkul/Installer/src/Http/Middleware/CanInstall.php
+++ b/packages/Webkul/Installer/src/Http/Middleware/CanInstall.php
@@ -4,9 +4,9 @@... | [
"packages/Webkul/Installer/src/Http/Middleware/CanInstall.php"
] | [
{
"comment": "The comment says the completion marker is “only written by the final SMTP step”, but the current UI flow writes the marker at the end of admin creation (or after demo-data seeding). This is misleading documentation for why the middleware is safe for XHR requests.",
"path": "packages/Webkul/Ins... | true | ||
unopim/unopim | 459 | comment_to_fix | Harden installer state guards and seal install endpoints once installed | This docblock still claims the `storage/installed` marker is written by `smtpConfigSetup()`, but that endpoint isn’t part of the current web installer flow (and the marker is now written after `adminConfigSetup()` or `seedSampleData()`). Updating this avoids future confusion about what “installation completed” means. | 7ee7c2a18c1680d133afe7353fd5f32fd2c33e3a | 2c1c40dc9827aba8b5da20a098e000dc3488d2ea | diff --git a/packages/Webkul/Installer/src/Http/Middleware/CanInstall.php b/packages/Webkul/Installer/src/Http/Middleware/CanInstall.php
index 83a77b782..0ed586a4b 100644
--- a/packages/Webkul/Installer/src/Http/Middleware/CanInstall.php
+++ b/packages/Webkul/Installer/src/Http/Middleware/CanInstall.php
@@ -4,9 +4,9 @@... | [
"packages/Webkul/Installer/src/Http/Middleware/CanInstall.php"
] | [
{
"comment": "This docblock still claims the `storage/installed` marker is written by `smtpConfigSetup()`, but that endpoint isn’t part of the current web installer flow (and the marker is now written after `adminConfigSetup()` or `seedSampleData()`). Updating this avoids future confusion about what “installati... | true | ||
unopim/unopim | 459 | comment_to_fix | Harden installer state guards and seal install endpoints once installed | The docblock for `abortIfInstalled()` still says the marker is written only by the final SMTP step, but the marker is now written earlier (after admin creation, or after demo-data seeding when opted in). Keeping this accurate matters because this guard is used to justify that genuine installs won’t be blocked. | 7ee7c2a18c1680d133afe7353fd5f32fd2c33e3a | 2c1c40dc9827aba8b5da20a098e000dc3488d2ea | diff --git a/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php b/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php
index a9f2ee556..fdf514a73 100644
--- a/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php
+++ b/packages/Webkul/Installer/src/Http/Controllers... | [
"packages/Webkul/Installer/src/Http/Controllers/InstallerController.php"
] | [
{
"comment": "The docblock for `abortIfInstalled()` still says the marker is written only by the final SMTP step, but the marker is now written earlier (after admin creation, or after demo-data seeding when opted in). Keeping this accurate matters because this guard is used to justify that genuine installs won’... | true | ||
unopim/unopim | 459 | comment_to_fix | Harden installer state guards and seal install endpoints once installed | `markInstalled()` always rewrites the marker file and dispatches `unopim.installed`. Making it idempotent (like the CLI installer’s implementation) avoids accidental double-dispatch if two install requests race, and makes the method safe to call from multiple end-of-flow endpoints. | 7ee7c2a18c1680d133afe7353fd5f32fd2c33e3a | 2c1c40dc9827aba8b5da20a098e000dc3488d2ea | diff --git a/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php b/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php
index a9f2ee556..fdf514a73 100644
--- a/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php
+++ b/packages/Webkul/Installer/src/Http/Controllers... | [
"packages/Webkul/Installer/src/Http/Controllers/InstallerController.php"
] | [
{
"comment": "`markInstalled()` always rewrites the marker file and dispatches `unopim.installed`. Making it idempotent (like the CLI installer’s implementation) avoids accidental double-dispatch if two install requests race, and makes the method safe to call from multiple end-of-flow endpoints.",
"path": "... | true | ||
unopim/unopim | 459 | comment_to_fix | Harden installer state guards and seal install endpoints once installed | The UI installer’s `saveAdmin()` error handler calls `setErrors(error.response.data.errors)`. On exception this endpoint now returns only `{ success, error }`, so `errors` is missing and can lead to a client-side error / no visible feedback. Returning an `errors` object (even a generic one) keeps the response shape con... | 7ee7c2a18c1680d133afe7353fd5f32fd2c33e3a | 2c1c40dc9827aba8b5da20a098e000dc3488d2ea | diff --git a/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php b/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php
index a9f2ee556..fdf514a73 100644
--- a/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php
+++ b/packages/Webkul/Installer/src/Http/Controllers... | [
"packages/Webkul/Installer/src/Http/Controllers/InstallerController.php"
] | [
{
"comment": "The UI installer’s `saveAdmin()` error handler calls `setErrors(error.response.data.errors)`. On exception this endpoint now returns only `{ success, error }`, so `errors` is missing and can lead to a client-side error / no visible feedback. Returning an `errors` object (even a generic one) keeps ... | true | ||
unopim/unopim | 459 | comment_to_fix | Harden installer state guards and seal install endpoints once installed | `seedSampleData()` seals the installer (`markInstalled()`) before verifying the demo-data seeder result. If seeding fails and returns 500, the instance will still be marked installed and subsequent retries will be blocked, potentially leaving the system half-installed. | 7ee7c2a18c1680d133afe7353fd5f32fd2c33e3a | 2c1c40dc9827aba8b5da20a098e000dc3488d2ea | diff --git a/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php b/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php
index a9f2ee556..fdf514a73 100644
--- a/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php
+++ b/packages/Webkul/Installer/src/Http/Controllers... | [
"packages/Webkul/Installer/src/Http/Controllers/InstallerController.php"
] | [
{
"comment": "`seedSampleData()` seals the installer (`markInstalled()`) before verifying the demo-data seeder result. If seeding fails and returns 500, the instance will still be marked installed and subsequent retries will be blocked, potentially leaving the system half-installed.",
"path": "packages/Webk... | true | ||
unopim/unopim | 459 | comment_to_fix | Harden installer state guards and seal install endpoints once installed | The installer admin setup endpoint currently returns the raw exception message to an unauthenticated client (`$th->getMessage()`). This can leak sensitive internal details (SQL, connection info, etc.). Prefer a generic error message to the client and keep details in logs via `report()`. | 7ee7c2a18c1680d133afe7353fd5f32fd2c33e3a | 2c1c40dc9827aba8b5da20a098e000dc3488d2ea | diff --git a/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php b/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php
index a9f2ee556..fdf514a73 100644
--- a/packages/Webkul/Installer/src/Http/Controllers/InstallerController.php
+++ b/packages/Webkul/Installer/src/Http/Controllers... | [
"packages/Webkul/Installer/src/Http/Controllers/InstallerController.php"
] | [
{
"comment": "The installer admin setup endpoint currently returns the raw exception message to an unauthenticated client (`$th->getMessage()`). This can leak sensitive internal details (SQL, connection info, etc.). Prefer a generic error message to the client and keep details in logs via `report()`.",
"pat... | true | ||
unopim/unopim | 459 | comment_to_fix | Harden installer state guards and seal install endpoints once installed | `markInstalled()` is introduced as the single place to write `storage/installed` and dispatch `unopim.installed`, but `createAdminCredentials()` still writes the marker and dispatches the event directly (later in this file). That keeps two sources of truth (different marker contents) and can dispatch before optional de... | 7ee7c2a18c1680d133afe7353fd5f32fd2c33e3a | 2c1c40dc9827aba8b5da20a098e000dc3488d2ea | diff --git a/packages/Webkul/Installer/src/Console/Commands/Installer.php b/packages/Webkul/Installer/src/Console/Commands/Installer.php
index 9594da3f3..0df8b223d 100644
--- a/packages/Webkul/Installer/src/Console/Commands/Installer.php
+++ b/packages/Webkul/Installer/src/Console/Commands/Installer.php
@@ -157,9 +157,... | [
"packages/Webkul/Installer/src/Console/Commands/Installer.php"
] | [
{
"comment": "`markInstalled()` is introduced as the single place to write `storage/installed` and dispatch `unopim.installed`, but `createAdminCredentials()` still writes the marker and dispatches the event directly (later in this file). That keeps two sources of truth (different marker contents) and can dispa... | true | ||
unopim/unopim | 457 | issue_to_patch | fix(installer): drop hardcoded admin default credentials; preserve operator rotations on re-seed | ## Summary
- **Security:** removes hardcoded `******@example.com` / `*****123` default seeded by `AdminsTableSeeder` on first Docker boot. Replaced with env-driven (`INSTALLER_ADMIN_EMAIL` / `INSTALLER_ADMIN_PASSWORD`) plus a per-install random 20-char password written once to `storage/app/admin-credentials.txt` (chmo... | 7ee7c2a18c1680d133afe7353fd5f32fd2c33e3a | d6c62571542e82183524edb4e22196c79087fe94 | diff --git a/.env.docker b/.env.docker
index 395f1e671..a2ed41de4 100644
--- a/.env.docker
+++ b/.env.docker
@@ -16,6 +16,14 @@ APP_NAME=UnoPim
APP_ENV=local
APP_KEY=
APP_DEBUG=true
+
+# Initial admin (used by AdminsTableSeeder on first boot only).
+# Leave blank to auto-generate a random password and write it to
+#... | [
".env.docker",
".env.example",
".github/workflows/playwright_test.yml",
"CHANGELOG.md",
"dockerfiles/fpm-entrypoint.sh",
"dockerfiles/web-entrypoint.sh",
"packages/Webkul/Installer/src/Database/Seeders/User/AdminsTableSeeder.php",
"packages/Webkul/Installer/src/Database/Seeders/User/RolesTableSeeder.p... | [
{
"comment": "The idempotency guard only checks for an existing row by the computed email, but the insert still hard-codes `id => 1`. If the operator has rotated the seeded admin email away from `admin@example.com` (or set `INSTALLER_ADMIN_EMAIL` differently on a later run), a subsequent `db:seed` will not find... | diff --git a/.github/workflows/playwright_test.yml b/.github/workflows/playwright_test.yml
index 014af5c25..37b0d123e 100644
--- a/.github/workflows/playwright_test.yml
+++ b/.github/workflows/playwright_test.yml
@@ -120,6 +120,14 @@ jobs:
sed -i "s|^\(DB_PASSWORD=\s*\).*$|\1root|" .env
- name: Runn... | true | |
unopim/unopim | 457 | comment_to_fix | fix(installer): drop hardcoded admin default credentials; preserve operator rotations on re-seed | The idempotency guard only checks for an existing row by the computed email, but the insert still hard-codes `id => 1`. If the operator has rotated the seeded admin email away from `admin@example.com` (or set `INSTALLER_ADMIN_EMAIL` differently on a later run), a subsequent `db:seed` will not find that email and will a... | 7ee7c2a18c1680d133afe7353fd5f32fd2c33e3a | d6c62571542e82183524edb4e22196c79087fe94 | diff --git a/packages/Webkul/Installer/src/Database/Seeders/User/AdminsTableSeeder.php b/packages/Webkul/Installer/src/Database/Seeders/User/AdminsTableSeeder.php
index d7d9ca924..e721b90ce 100755
--- a/packages/Webkul/Installer/src/Database/Seeders/User/AdminsTableSeeder.php
+++ b/packages/Webkul/Installer/src/Databas... | [
"packages/Webkul/Installer/src/Database/Seeders/User/AdminsTableSeeder.php"
] | [
{
"comment": "The idempotency guard only checks for an existing row by the computed email, but the insert still hard-codes `id => 1`. If the operator has rotated the seeded admin email away from `admin@example.com` (or set `INSTALLER_ADMIN_EMAIL` differently on a later run), a subsequent `db:seed` will not find... | true | ||
unopim/unopim | 457 | comment_to_fix | fix(installer): drop hardcoded admin default credentials; preserve operator rotations on re-seed | `writeGeneratedCredentialsFile()` suppresses errors from `file_put_contents()` / `chmod()` and proceeds even if the credentials file was not written. When a random password is generated, a silent write failure can leave the operator without any way to discover the initial password, effectively locking them out. | 7ee7c2a18c1680d133afe7353fd5f32fd2c33e3a | d6c62571542e82183524edb4e22196c79087fe94 | diff --git a/packages/Webkul/Installer/src/Database/Seeders/User/AdminsTableSeeder.php b/packages/Webkul/Installer/src/Database/Seeders/User/AdminsTableSeeder.php
index d7d9ca924..e721b90ce 100755
--- a/packages/Webkul/Installer/src/Database/Seeders/User/AdminsTableSeeder.php
+++ b/packages/Webkul/Installer/src/Databas... | [
"packages/Webkul/Installer/src/Database/Seeders/User/AdminsTableSeeder.php"
] | [
{
"comment": "`writeGeneratedCredentialsFile()` suppresses errors from `file_put_contents()` / `chmod()` and proceeds even if the credentials file was not written. When a random password is generated, a silent write failure can leave the operator without any way to discover the initial password, effectively loc... | true | ||
unopim/unopim | 456 | issue_to_patch | feat(app-url-guard): add APP_URL mismatch developer guard package | ## Description
Adds a debug-only `Webkul\AppUrlGuard` package that detects when the browser host doesn't match `APP_URL` — the cause of the "styles/JS not loading" bug — and shows a guided fix modal styled to match the login page. Fully inert in production (`APP_DEBUG=false`).
**Behavior (debug only):**
- Inject... | 7ee7c2a18c1680d133afe7353fd5f32fd2c33e3a | 9cbef4df76ca132133c4d6b5eaa20007d9cc46d2 | diff --git a/bootstrap/providers.php b/bootstrap/providers.php
index 3510bd1d8..567ce034b 100644
--- a/bootstrap/providers.php
+++ b/bootstrap/providers.php
@@ -3,6 +3,7 @@
use Webkul\Admin\Providers\AdminServiceProvider;
use Webkul\AdminApi\Providers\AdminApiServiceProvider;
use Webkul\AiAgent\Providers\AiAgentServ... | [
"bootstrap/providers.php",
"composer.json",
"packages/Webkul/AppUrlGuard/src/Concerns/NormalizesUrl.php",
"packages/Webkul/AppUrlGuard/src/Http/Controllers/AppUrlGuardController.php",
"packages/Webkul/AppUrlGuard/src/Http/Middleware/VerifyAppUrlMatches.php",
"packages/Webkul/AppUrlGuard/src/Providers/AppU... | [
{
"comment": "The check endpoint route is registered without the `web` middleware group, so it won’t have a session. Because `VerifyAppUrlMatches` is pushed onto the global middleware stack and uses the session to log only once per session, calls to this endpoint can cause repeated mismatch logs (and skip local... | diff --git a/packages/Webkul/AppUrlGuard/tests/Feature/AppUrlGuardEndpointTest.php b/packages/Webkul/AppUrlGuard/tests/Feature/AppUrlGuardEndpointTest.php
new file mode 100644
index 000000000..99cf4b3f7
--- /dev/null
+++ b/packages/Webkul/AppUrlGuard/tests/Feature/AppUrlGuardEndpointTest.php
@@ -0,0 +1,228 @@
+<?php
+
... | true | |
unopim/unopim | 456 | comment_to_fix | feat(app-url-guard): add APP_URL mismatch developer guard package | The check endpoint route is registered without the `web` middleware group, so it won’t have a session. Because `VerifyAppUrlMatches` is pushed onto the global middleware stack and uses the session to log only once per session, calls to this endpoint can cause repeated mismatch logs (and skip locale/session-related midd... | 7ee7c2a18c1680d133afe7353fd5f32fd2c33e3a | 9cbef4df76ca132133c4d6b5eaa20007d9cc46d2 | diff --git a/packages/Webkul/AppUrlGuard/src/Routes/web.php b/packages/Webkul/AppUrlGuard/src/Routes/web.php
new file mode 100644
index 000000000..fa166345c
--- /dev/null
+++ b/packages/Webkul/AppUrlGuard/src/Routes/web.php
@@ -0,0 +1,12 @@
+<?php
+
+use Illuminate\Support\Facades\Route;
+use Webkul\AppUrlGuard\Http\Co... | [
"packages/Webkul/AppUrlGuard/src/Routes/web.php"
] | [
{
"comment": "The check endpoint route is registered without the `web` middleware group, so it won’t have a session. Because `VerifyAppUrlMatches` is pushed onto the global middleware stack and uses the session to log only once per session, calls to this endpoint can cause repeated mismatch logs (and skip local... | true | ||
unopim/unopim | 456 | comment_to_fix | feat(app-url-guard): add APP_URL mismatch developer guard package | `normalize()` lowercases the entire URL string (`strtolower(trim($url))`), which also lowercases the path segment. URL paths are case-sensitive, so this can incorrectly treat distinct base paths (e.g. `/ERP/public` vs `/erp/public`) as equal and suppress a warning even though generated asset URLs may still break.
Cons... | 7ee7c2a18c1680d133afe7353fd5f32fd2c33e3a | 9cbef4df76ca132133c4d6b5eaa20007d9cc46d2 | diff --git a/packages/Webkul/AppUrlGuard/src/Concerns/NormalizesUrl.php b/packages/Webkul/AppUrlGuard/src/Concerns/NormalizesUrl.php
new file mode 100644
index 000000000..7d35347db
--- /dev/null
+++ b/packages/Webkul/AppUrlGuard/src/Concerns/NormalizesUrl.php
@@ -0,0 +1,64 @@
+<?php
+
+namespace Webkul\AppUrlGuard\Conc... | [
"packages/Webkul/AppUrlGuard/src/Concerns/NormalizesUrl.php"
] | [
{
"comment": "`normalize()` lowercases the entire URL string (`strtolower(trim($url))`), which also lowercases the path segment. URL paths are case-sensitive, so this can incorrectly treat distinct base paths (e.g. `/ERP/public` vs `/erp/public`) as equal and suppress a warning even though generated asset URLs ... | true | ||
unopim/unopim | 456 | comment_to_fix | feat(app-url-guard): add APP_URL mismatch developer guard package | The modal CSS imports Google Fonts (`fonts.googleapis.com`), which contradicts the PR description (“inline SVG — no font dependency”) and introduces an external network dependency (and potential CSP/privacy issues) even in debug mode.
If the intent is to keep the warning fully self-contained, remove the `@import` and ... | 7ee7c2a18c1680d133afe7353fd5f32fd2c33e3a | 9cbef4df76ca132133c4d6b5eaa20007d9cc46d2 | diff --git a/packages/Webkul/AppUrlGuard/src/Resources/views/warning.blade.php b/packages/Webkul/AppUrlGuard/src/Resources/views/warning.blade.php
new file mode 100644
index 000000000..345ac1f0e
--- /dev/null
+++ b/packages/Webkul/AppUrlGuard/src/Resources/views/warning.blade.php
@@ -0,0 +1,499 @@
+<div
+ id="unopim... | [
"packages/Webkul/AppUrlGuard/src/Resources/views/warning.blade.php"
] | [
{
"comment": "The modal CSS imports Google Fonts (`fonts.googleapis.com`), which contradicts the PR description (“inline SVG — no font dependency”) and introduces an external network dependency (and potential CSP/privacy issues) even in debug mode.\n\nIf the intent is to keep the warning fully self-contained, r... | true | ||
unopim/unopim | 455 | issue_to_patch | chore(release): v2.1.2 webhook SSRF security patch | Release bump for the 2.1 line. Bumps Core::VERSION to 2.1.2 and adds a changelog entry for the webhook URL handling improvements already merged via #448 and #450 — webhook URLs are validated to resolve to a publicly reachable host before any request, redirects are no longer followed, and requests connect only to the va... | a186119c603b51264779b07e549fa91946e9aaf8 | d10b8544dc04b68ee408a5ab92980435f1d0f6ec | diff --git a/CHANGELOG.md b/CHANGELOG.md
index dae63c70c..28b2fa5fb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
# v2.1.x
+## v2.1.2 - 2026-05-29
+
+### Improvements
+- Hardened **webhook URL handling** — webhook target URLs are now validated to ensure they resolve to a publicly reachable host befor... | [
"CHANGELOG.md",
"packages/Webkul/Core/src/Core.php"
] | [] | true | ||
unopim/unopim | 454 | issue_to_patch | chore(release): v2.0.2 webhook SSRF security patch | Release bump for the 2.0 LTS line. Bumps Core::VERSION to 2.0.2 and adds a changelog entry for the webhook URL handling improvements already merged via #447 and #451 (same hardening as 2.1). Version + CHANGELOG only. Pint, translations (224/224), and the webhook Pest suite are green. | 9cf93362c5f48ea7f7318f2b461fc978bb87ba83 | 6ecce9a14598322c08dc878fdbe2b4256308b6b5 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b542cdcc6..a887a60b4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
# v2.0.x
+## v2.0.2 - 2026-05-29
+
+### Improvements
+- Hardened **webhook URL handling** — webhook target URLs are now validated to ensure they resolve to a publicly reachable host befor... | [
"CHANGELOG.md",
"packages/Webkul/Core/src/Core.php"
] | [] | true | ||
unopim/unopim | 447 | issue_to_patch | fix(webhook): validate URL on save and harden logs status filter (2.0 backport of #398) | Backport of #398 to 2.0.
| c689083c49c7ad7fa016f7994aae2ce733c7001c | e15e320ee2a5141ef4fc04fea66c03295f9d3dcf | diff --git a/packages/Webkul/Webhook/src/DataGrids/LogsDataGrid.php b/packages/Webkul/Webhook/src/DataGrids/LogsDataGrid.php
index 37047f4e7..f63238fe4 100644
--- a/packages/Webkul/Webhook/src/DataGrids/LogsDataGrid.php
+++ b/packages/Webkul/Webhook/src/DataGrids/LogsDataGrid.php
@@ -28,7 +28,8 @@ public function prepa... | [
"packages/Webkul/Admin/tests/Feature/Webhook/WebhookLogsFilterTest.php",
"packages/Webkul/Admin/tests/Feature/Webhook/WebhookSettingsValidationTest.php",
"packages/Webkul/Admin/tests/Feature/Webhook/WebhookStatusTest.php",
"packages/Webkul/Webhook/src/DataGrids/LogsDataGrid.php",
"packages/Webkul/Webhook/sr... | [
{
"comment": "This conditional assertion silently passes when no status control is found within the 2-second timeout, defeating the purpose of the test. If the dropdown filter UI breaks or its selectors change, the test will still report green. Consider either (a) using a definite selector for the new dropdown ... | diff --git a/packages/Webkul/Admin/tests/Feature/Webhook/WebhookLogsFilterTest.php b/packages/Webkul/Admin/tests/Feature/Webhook/WebhookLogsFilterTest.php
new file mode 100644
index 000000000..64160179b
--- /dev/null
+++ b/packages/Webkul/Admin/tests/Feature/Webhook/WebhookLogsFilterTest.php
@@ -0,0 +1,184 @@
+<?php
+
... | true | |
unopim/unopim | 447 | comment_to_fix | fix(webhook): validate URL on save and harden logs status filter (2.0 backport of #398) | This conditional assertion silently passes when no status control is found within the 2-second timeout, defeating the purpose of the test. If the dropdown filter UI breaks or its selectors change, the test will still report green. Consider either (a) using a definite selector for the new dropdown filter UI and assertin... | c689083c49c7ad7fa016f7994aae2ce733c7001c | e15e320ee2a5141ef4fc04fea66c03295f9d3dcf | diff --git a/tests/e2e-pw/tests/02-configuration/webhook.spec.js b/tests/e2e-pw/tests/02-configuration/webhook.spec.js
index 2257a3906..5f48949f2 100644
--- a/tests/e2e-pw/tests/02-configuration/webhook.spec.js
+++ b/tests/e2e-pw/tests/02-configuration/webhook.spec.js
@@ -23,7 +23,7 @@ test('Check the page after clicki... | [
"tests/e2e-pw/tests/02-configuration/webhook.spec.js"
] | [
{
"comment": "This conditional assertion silently passes when no status control is found within the 2-second timeout, defeating the purpose of the test. If the dropdown filter UI breaks or its selectors change, the test will still report green. Consider either (a) using a definite selector for the new dropdown ... | true | ||
unopim/unopim | 447 | comment_to_fix | fix(webhook): validate URL on save and harden logs status filter (2.0 backport of #398) | `buildStatusFilterOptions()` issues a `SELECT DISTINCT status, extra->response->status` against `webhook_logs` every time the logs datagrid is rendered. On a JSON column without an index, this is a full table scan, which can become an operational issue as the webhook log table grows. Consider caching the option list fo... | c689083c49c7ad7fa016f7994aae2ce733c7001c | e15e320ee2a5141ef4fc04fea66c03295f9d3dcf | diff --git a/packages/Webkul/Webhook/src/DataGrids/LogsDataGrid.php b/packages/Webkul/Webhook/src/DataGrids/LogsDataGrid.php
index 37047f4e7..f63238fe4 100644
--- a/packages/Webkul/Webhook/src/DataGrids/LogsDataGrid.php
+++ b/packages/Webkul/Webhook/src/DataGrids/LogsDataGrid.php
@@ -28,7 +28,8 @@ public function prepa... | [
"packages/Webkul/Webhook/src/DataGrids/LogsDataGrid.php"
] | [
{
"comment": "`buildStatusFilterOptions()` issues a `SELECT DISTINCT status, extra->response->status` against `webhook_logs` every time the logs datagrid is rendered. On a JSON column without an index, this is a full table scan, which can become an operational issue as the webhook log table grows. Consider cach... | true | ||
unopim/unopim | 447 | comment_to_fix | fix(webhook): validate URL on save and harden logs status filter (2.0 backport of #398) | `processRequestedFilters` assumes `$requestedFilters['status']` is always an array and iterates it via `foreach`. If a caller submits a scalar (e.g. `?filters[status]=1:200`), the foreach over a string will iterate characters and produce wrong predicates (or silently match nothing). Consider normalising `$statusValues`... | c689083c49c7ad7fa016f7994aae2ce733c7001c | e15e320ee2a5141ef4fc04fea66c03295f9d3dcf | diff --git a/packages/Webkul/Webhook/src/DataGrids/LogsDataGrid.php b/packages/Webkul/Webhook/src/DataGrids/LogsDataGrid.php
index 37047f4e7..f63238fe4 100644
--- a/packages/Webkul/Webhook/src/DataGrids/LogsDataGrid.php
+++ b/packages/Webkul/Webhook/src/DataGrids/LogsDataGrid.php
@@ -28,7 +28,8 @@ public function prepa... | [
"packages/Webkul/Webhook/src/DataGrids/LogsDataGrid.php"
] | [
{
"comment": "`processRequestedFilters` assumes `$requestedFilters['status']` is always an array and iterates it via `foreach`. If a caller submits a scalar (e.g. `?filters[status]=1:200`), the foreach over a string will iterate characters and produce wrong predicates (or silently match nothing). Consider norma... | true | ||
unopim/unopim | 447 | comment_to_fix | fix(webhook): validate URL on save and harden logs status filter (2.0 backport of #398) | The `connection_failed` translation strings across all locales (e.g. en_US:49, de_DE:48, fr_FR:48, etc.) do not contain a `:error` placeholder, but `testWebhookUrl()` passes `['error' => $e->getMessage()]` to `trans(...)`. The exception message is therefore silently dropped from the user-facing error. Either add `:erro... | c689083c49c7ad7fa016f7994aae2ce733c7001c | e15e320ee2a5141ef4fc04fea66c03295f9d3dcf | diff --git a/packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php b/packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php
index c2a77d892..93c375a96 100644
--- a/packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php
+++ b/packages/Webkul/Webhook/src/Http/C... | [
"packages/Webkul/Webhook/src/Http/Controllers/WebhookSettingsController.php"
] | [
{
"comment": "The `connection_failed` translation strings across all locales (e.g. en_US:49, de_DE:48, fr_FR:48, etc.) do not contain a `:error` placeholder, but `testWebhookUrl()` passes `['error' => $e->getMessage()]` to `trans(...)`. The exception message is therefore silently dropped from the user-facing er... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.