Skip to content

Commit 2ae7ed1

Browse files
committed
Merge branch 'master' into relationship-columns-definition
# Conflicts: # src/app/Library/CrudPanel/Traits/ColumnsProtectedMethods.php
2 parents 95e6103 + ecb05f5 commit 2ae7ed1

File tree

236 files changed

+13242
-22173
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

236 files changed

+13242
-22173
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ src/public/packages/nestedSortable/package.json
2424
src/public/packages/source-sans-pro/package.json
2525
src/public/packages/tinymce/package.json
2626
src/public/packages/tinymce/composer.json
27+

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<a href="https://backpackforlaravel.com/newsletter">Newsletter</a>
3131
</p>
3232

33+
3334
Quickly build an admin interface for your Eloquent models. Then customize every little detail. Among its features:
3435

3536
- List operation

SECURITY.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ If you discover any security related issues, please email [email protected] inst
1919

2020
## Past Vulnerabilities
2121

22-
Since its inception in 2016, Backpack has had zero security breaches or reported security issues. However, its dependencies _have_ had security flaws discovered and fixed - even major ones like Laravel, Bootstrap and jQuery. That's why it's a good idea for any project to be reasonably up-to-date. If we consider a security issue is something that affects our users, we'll email you.
23-
24-
It's _heavily_ recommended that you **[subscribe to the Backpack Newsletter](http://backpackforlaravel.com/newsletter)** so you can find out about any security updates, breaking changes or major features. We send an email about 1-2 emails per year. Sometimes less.
22+
Please note that even though Backpack has only had minor reported security issues, its dependencies _have_ had security flaws discovered and fixed - even major ones like Laravel, Bootstrap and jQuery. That's why it's a good idea for any project to be reasonably up-to-date. If we consider a security issue is something that affects our users, we'll email you. Please **[subscribe to the Backpack Newsletter](http://backpackforlaravel.com/newsletter)** so you can find out about any security updates, breaking changes or major features. We only send an email 1-2 emails per year. Sometimes less.
23+
24+
**Past security issues:**
25+
- 2021
26+
- March - [Security Issue If You Use SQL Server (May Affect <0.02% Backpack Projects)](https://backpackforlaravel.com/articles/news/possible-security-issue-especially-important-if-you-use-sql-server)
27+
- 2020 - none
28+
- 2019 - none
29+
- 2018 - none
30+
- 2017 - none
31+
- 2016 - none

package-lock.json

Lines changed: 11517 additions & 20714 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,31 @@
1212
"devDependencies": {
1313
"cross-env": "^7.0.3",
1414
"css-loader": "^5.2.6",
15-
"laravel-mix": "^6.0.19",
15+
"laravel-mix": "^6.0.31",
1616
"lodash": "^4.17.21",
1717
"pace": "0.0.4",
18-
"resolve-url-loader": "^2.3.2",
19-
"sass": "^1.32.12",
18+
"resolve-url-loader": "^4.0.0",
19+
"sass": "^1.42.1",
2020
"sass-loader": "^9.0.3",
21-
"vue-template-compiler": "^2.6.12"
21+
"vue-template-compiler": "^2.6.14"
2222
},
2323
"dependencies": {
2424
"@coreui/coreui": "^2.1.16",
2525
"@digitallyhappy/backstrap": "^0.3.4",
2626
"animate.css": "^3.7.2",
2727
"bootstrap": "^4.6.0",
28-
"bootstrap-colorpicker": "^3.3.0",
28+
"bootstrap-colorpicker": "^3.4.0",
2929
"bootstrap-datepicker": "^1.9.0",
3030
"bootstrap-daterangepicker": "^3.1.0",
3131
"bootstrap-iconpicker": "^1.8.2",
3232
"ckeditor": "^4.12.1",
33-
"cropperjs": "^1.5.11",
34-
"datatables.net": "^1.10.23",
35-
"datatables.net-bs4": "^1.10.23",
36-
"datatables.net-fixedheader": "^3.1.8",
37-
"datatables.net-fixedheader-bs4": "^3.1.8",
33+
"cropperjs": "^1.5.12",
34+
"datatables.net": "^1.11.3",
35+
"datatables.net-bs4": "^1.11.3",
36+
"datatables.net-fixedheader": "^3.2.0",
37+
"datatables.net-fixedheader-bs4": "^3.2.0",
3838
"datatables.net-responsive": "^2.2.7",
39-
"datatables.net-responsive-bs4": "^2.2.7",
39+
"datatables.net-responsive-bs4": "^2.2.9",
4040
"easymde": "^2.15.0",
4141
"jquery": "^3.6.0",
4242
"jquery-colorbox": "^1.6.4",
@@ -49,7 +49,7 @@
4949
"noty": "^3.2.0-beta",
5050
"pace-js": "^1.2.4",
5151
"pc-bootstrap4-datetimepicker": "^4.17.51",
52-
"perfect-scrollbar": "^1.5.0",
52+
"perfect-scrollbar": "^1.5.2",
5353
"places.js": "^1.19.0",
5454
"popper.js": "^1.16.1",
5555
"select2": "^4.0.13",
@@ -59,6 +59,6 @@
5959
"source-sans-pro": "^3.6",
6060
"summernote": "^0.8.18",
6161
"sweetalert": "^2.1.2",
62-
"tinymce": "^5.7.0"
62+
"tinymce": "^5.9.2"
6363
}
6464
}

src/BackpackServiceProvider.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Backpack\CRUD;
44

5+
use Backpack\CRUD\app\Http\Middleware\ThrottlePasswordRecovery;
56
use Backpack\CRUD\app\Library\CrudPanel\CrudPanel;
67
use Illuminate\Routing\Router;
78
use Illuminate\Support\Collection;
@@ -21,6 +22,7 @@ class BackpackServiceProvider extends ServiceProvider
2122
\Backpack\CRUD\app\Console\Commands\CreateUser::class,
2223
\Backpack\CRUD\app\Console\Commands\PublishBackpackMiddleware::class,
2324
\Backpack\CRUD\app\Console\Commands\PublishView::class,
25+
\Backpack\CRUD\app\Console\Commands\RequireDevTools::class,
2426
];
2527

2628
// Indicates if loading of the provider is deferred.
@@ -92,6 +94,12 @@ public function registerMiddlewareGroup(Router $router)
9294
foreach ($middleware_class as $middleware_class) {
9395
$router->pushMiddlewareToGroup($middleware_key, $middleware_class);
9496
}
97+
98+
// register internal backpack middleware for throttling the password recovery functionality
99+
// but only if functionality is enabled by developer in config
100+
if (config('backpack.base.setup_password_recovery_routes')) {
101+
$router->aliasMiddleware('backpack.throttle.password.recovery', ThrottlePasswordRecovery::class);
102+
}
95103
}
96104

97105
public function publishFiles()
@@ -141,8 +149,7 @@ public function publishFiles()
141149
/**
142150
* Define the routes for the application.
143151
*
144-
* @param \Illuminate\Routing\Router $router
145-
*
152+
* @param \Illuminate\Routing\Router $router
146153
* @return void
147154
*/
148155
public function setupRoutes(Router $router)
@@ -161,8 +168,7 @@ public function setupRoutes(Router $router)
161168
/**
162169
* Load custom routes file.
163170
*
164-
* @param \Illuminate\Routing\Router $router
165-
*
171+
* @param \Illuminate\Routing\Router $router
166172
* @return void
167173
*/
168174
public function setupCustomRoutes(Router $router)
@@ -269,7 +275,8 @@ public function loadConfigs()
269275
'backpack' => [
270276
'provider' => 'backpack',
271277
'table' => 'password_resets',
272-
'expire' => 60,
278+
'expire' => 60,
279+
'throttle' => config('backpack.base.password_recovery_throttle_notifications'),
273280
],
274281
];
275282

src/Stats.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,9 @@ private function sendUsageStats()
8282
* It spins up a separate process for this, and doesn't listen for a reponse,
8383
* so it has minimal to no impact on pageload.
8484
*
85-
* @param string $method HTTP Method to use for the request.
86-
* @param string $url URL to point the request at.
87-
* @param array $payload The data you want sent to the URL.
88-
*
85+
* @param string $method HTTP Method to use for the request.
86+
* @param string $url URL to point the request at.
87+
* @param array $payload The data you want sent to the URL.
8988
* @return void
9089
*/
9190
private function makeCurlRequest($method, $url, $payload)
@@ -107,10 +106,9 @@ private function makeCurlRequest($method, $url, $payload)
107106
* geographic location this is usually slower than CURL. However,
108107
* unlike CURL, it works on most machines, so it's reliable.
109108
*
110-
* @param string $method HTTP Method to use for the request.
111-
* @param string $url URL to point the request at.
112-
* @param array $payload The data you want sent to the URL.
113-
*
109+
* @param string $method HTTP Method to use for the request.
110+
* @param string $url URL to point the request at.
111+
* @param array $payload The data you want sent to the URL.
114112
* @return void
115113
*/
116114
private function makeGuzzleRequest($method, $url, $payload)

src/app/Console/Commands/AddCustomRouteContent.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ private function customRoutesFileEndLine($file_lines)
9999
/**
100100
* Parse the given file stream and return the line number where a string is found.
101101
*
102-
* @param string $needle The string that's being searched for.
103-
* @param array $haystack The file where the search is being performed.
104-
* @return bool|int The last line number where the string was found. Or false.
102+
* @param string $needle The string that's being searched for.
103+
* @param array $haystack The file where the search is being performed.
104+
* @return bool|int The last line number where the string was found. Or false.
105105
*/
106106
private function getLastLineNumberThatContains($needle, $haystack)
107107
{

src/app/Console/Commands/AddSidebarContent.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ public function handle()
6565
/**
6666
* Parse the given file stream and return the line number where a string is found.
6767
*
68-
* @param string $needle The string that's being searched for.
69-
* @param array $haystack The file where the search is being performed.
70-
* @return bool|int The last line number where the string was found. Or false.
68+
* @param string $needle The string that's being searched for.
69+
* @param array $haystack The file where the search is being performed.
70+
* @return bool|int The last line number where the string was found. Or false.
7171
*/
7272
private function getLastLineNumberThatContains($needle, $haystack)
7373
{

src/app/Console/Commands/Install.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,14 @@ public function handle()
5757

5858
$this->progressBar->finish();
5959
$this->info(' Backpack installation finished.');
60+
61+
// DevTools
62+
$this->box('Did you know about Backpack DevTools?');
63+
$this->note('DevTools adds a dead-simple web interface to easily generate Models, Migrations, Seeders, Factories, CRUDs, etc.');
64+
$this->note('But it\'s a paid tool. For more info, payment and access, please visit https://backpackforlaravel.com/products/devtools');
65+
66+
if ($this->confirm('Would you like to install Backpack DevTools?', false)) {
67+
$this->call('backpack:require:devtools');
68+
}
6069
}
6170
}

0 commit comments

Comments
 (0)