Skip to content

Commit e55d3c1

Browse files
committed
Add check on SFTP page to make sure the permission is assigned before showing
1 parent abd2a42 commit e55d3c1

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
1111
* Debug bar is only checked when the app is set to debug mode in the API session handler, rather than when it is in local mode to match the plugin settings.
1212
* Added validation to port allocations to prevent allocation of restricted or invalid ports.
1313
* Fix data integrity exception thrown when attempting to store updated server egg variables.
14+
* Added missing permissions check on 'SFTP Configuration' page to ensure user has permission to access a server's SFTP server before showing a user credentials.
1415

1516
### Changed
1617
* Panel now throws proper 504: Gateway Timeout errors on server listing when daemon is offline.

app/Http/Controllers/Server/Settings/SftpController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ class SftpController extends Controller
1616
*
1717
* @param \Illuminate\Http\Request $request
1818
* @return \Illuminate\View\View
19+
*
20+
* @throws \Illuminate\Auth\Access\AuthorizationException
1921
*/
2022
public function index(Request $request): View
2123
{
24+
$this->authorize('access-sftp', $request->attributes->get('server'));
2225
$this->setRequest($request)->injectJavascript();
2326

2427
return view('server.settings.sftp');

0 commit comments

Comments
 (0)