Skip to content

Commit 37a4a15

Browse files
committed
Merge branch 'hotfix' into develop
2 parents 1cf9ca8 + c3ab9a6 commit 37a4a15

4 files changed

Lines changed: 14 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
3737
## [v4.2.3]
3838

3939
### Added
40-
- Config to set Domain of RememberMe Cookie ([#990]; [#991]; Thanks @xrobau!)
40+
- Config to set Domain of RememberMe Cookie ([#990], [#991]; Thanks @xrobau !)
4141
- Config settings for password min/max length ([#993])
4242

4343
### Fixed
44-
- [PHPMailer] Turn off opportunistic TLS when disabled ([#986]; [#987])
45-
- Migrator now ignore files that don't end in `.php` ([#965]; Temporary fix for [#998])
44+
- [PHPMailer] Turn off opportunistic TLS when disabled ([#986], [#987])
45+
- Migrator now ignore files that don't end in `.php` ([#965], [#998])
46+
- Respects CSRF_ENABLED environment variable ([#976]; Thanks @Poldovico !)
4647

4748
## [v4.2.2]
4849

@@ -796,6 +797,7 @@ See [http://learn.userfrosting.com/upgrading/40-to-41](Upgrading 4.0.x to 4.1.x
796797
[#963]: https://github.com/userfrosting/UserFrosting/issues/963
797798
[#965]: https://github.com/userfrosting/UserFrosting/issues/965
798799
[#968]: https://github.com/userfrosting/UserFrosting/issues/968
800+
[#976]: https://github.com/userfrosting/UserFrosting/issues/976
799801
[#981]: https://github.com/userfrosting/UserFrosting/issues/981
800802
[#983]: https://github.com/userfrosting/UserFrosting/issues/983
801803
[#986]: https://github.com/userfrosting/UserFrosting/issues/986

app/sprinkles/core/config/default.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
* Note : CSRF Middleware should only be disabled for dev or debug purposes.
9898
*/
9999
'csrf' => [
100-
'enabled' => getenv('CSRF_ENABLED') ?: true,
100+
'enabled' => (getenv('CSRF_ENABLED') !== false) ? getenv('CSRF_ENABLED') : true,
101101
'name' => 'csrf',
102102
'storage_limit' => 200,
103103
'strength' => 16,

app/sprinkles/core/src/Database/Migrator/MigrationLocator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function getMigrations()
5656
foreach ($migrationFiles as $migrationFile) {
5757
// Note that PSR4 insists that all php files must end in PHP, so ignore all
5858
// files that don't end in PHP.
59-
if (preg_match('/php$/', $migrationFile)) {
59+
if ($migrationFile->getExtension() == 'php') {
6060
$migrations[] = $this->getMigrationDetails($migrationFile);
6161
}
6262
}

app/sprinkles/core/tests/Integration/Database/Migrator/MigrationLocatorTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,13 @@ public function testGetMigrations()
9090
new Resource($resourceStream, $resourceAccountLocation, 'one/CreatePasswordResetsTable.php'),
9191
new Resource($resourceStream, $resourceAccountLocation, 'two/CreateFlightsTable.php'),
9292
new Resource($resourceStream, $resourceAccountLocation, 'CreateMainTable.php'),
93-
new Resource($resourceStream, $resourceAccountLocation, 'README.md'), // This shoudn't be returned by the migrator
93+
94+
// Theses shoudn't be returned by the migrator
95+
new Resource($resourceStream, $resourceAccountLocation, 'README.md'),
96+
new Resource($resourceStream, $resourceAccountLocation, 'php.md'),
97+
new Resource($resourceStream, $resourceAccountLocation, 'foo.foophp'),
98+
new Resource($resourceStream, $resourceAccountLocation, 'blah.phpphp'),
99+
new Resource($resourceStream, $resourceAccountLocation, 'bar.phpbar'),
94100
]);
95101

96102
// Create a new MigrationLocator instance with our simulated ResourceLocation

0 commit comments

Comments
 (0)