diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4b30d8b25..83fb1a960 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,16 +13,9 @@ jobs: - name: Getting Liman' PHP Sandbox uses: actions/checkout@v2 with: - repository: mertcelen/liman-sandbox + repository: limanmys/php-sandbox path: package/liman/sandbox/php token: ${{ secrets.CI_TOKEN }} - - - name: Getting Liman' Python Sandbox - uses: actions/checkout@v2 - with: - repository: mertcelen/liman-sandbox-python - path: package/liman/sandbox/python - token: ${{ secrets.CI_TOKEN }} - uses: actions/cache@v2 with: path: ~/.npm @@ -32,7 +25,7 @@ jobs: - name: Getting Liman' WebSSH uses: actions/checkout@v2 with: - repository: mertcelen/webssh + repository: limanmys/webssh path: package/liman/webssh token: ${{ secrets.CI_TOKEN }} - name: Get Composer Cache Directory @@ -69,6 +62,8 @@ jobs: tools: composer extensions : ssh2, curl, sqlite3, ldap, mbstring, xml, zip, posix, smbclient, mongodb, gd - name: Build Liman Package + env: + SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} run: | DEBIAN_FRONTEND=noninteractive sudo apt install jq -y 1>/dev/null 2>/dev/null VERSION=`cat package/liman/server/storage/VERSION` @@ -79,7 +74,7 @@ jobs: DATE=$(date) composer install --no-dev -d package/liman/server git --git-dir=package/liman/server/.git log -30 --pretty=format:"%s%x09%ad" > package/liman/server/storage/changelog - rm -rf package/liman/server/.git package/liman/sandbox/php/.git package/liman/sandbox/python/.git + rm -rf package/liman/server/.git package/liman/sandbox/php/.git rm -rf package/liman/server/node_modules mv package/liman/server/storage/build_tools/DEBIAN package/ rm -rf package/liman/server/storage/build_tools @@ -106,6 +101,7 @@ jobs: """ > DEBIAN/control cd ../ dpkg-deb -Zgzip --build package + ls -lah [ "$GITHUB_REF" == "refs/heads/master" ] && CHANNEL="liman-release" || CHANNEL="liman-dev-release" [ "$GITHUB_REF" == "refs/heads/master" ] && FILE_NAME="liman-$VERSION-$GITHUB_RUN_NUMBER.deb" || FILE_NAME="liman-${GITHUB_REF#refs/heads/}-$VERSION-$GITHUB_RUN_NUMBER.deb" - curl -F "file=@/home/runner/work/liman/liman/package.deb" "https://slack.com/api/files.upload?token=xoxb-474187933397-695167035444-NFLf9tgYahuMsmeT7rwp5wnD&channels=$CHANNEL&filename=$FILE_NAME&pretty=1&initial_comment=$COMMIT" || echo \ No newline at end of file + curl -F "file=@package.deb" "https://slack.com/api/files.upload?token=$SLACK_TOKEN&channels=$CHANNEL&filename=$FILE_NAME&pretty=1&initial_comment=$COMMIT" || echo \ No newline at end of file diff --git a/app/Connectors/WinRMConnector.php b/app/Connectors/WinRMConnector.php index a744d8f35..47ff8c474 100755 --- a/app/Connectors/WinRMConnector.php +++ b/app/Connectors/WinRMConnector.php @@ -7,6 +7,7 @@ use GuzzleHttp\Client; use Illuminate\Support\Str; use App\Models\ConnectorToken; +use mervick\aesEverywhere\AES256; class WinRMConnector implements Connector { @@ -40,15 +41,7 @@ public static function retrieveCredentials() } $key = env('APP_KEY') . user()->id . server()->id; - $decrypted = openssl_decrypt($username["value"], 'aes-256-cfb8', $key); - $stringToDecode = substr($decrypted, 16); - $username = base64_decode($stringToDecode); - - $key = env('APP_KEY') . user()->id . server()->id; - $decrypted = openssl_decrypt($password["value"], 'aes-256-cfb8', $key); - $stringToDecode = substr($decrypted, 16); - $password = base64_decode($stringToDecode); - return [$username, $password]; + return [AES256::decrypt($username["value"],$key), AES256::decrypt($password["value"],$key)]; } public function execute($command) diff --git a/app/Events/ExtensionRendered.php b/app/Events/ExtensionRendered.php index dc08d3945..9d66c6fba 100644 --- a/app/Events/ExtensionRendered.php +++ b/app/Events/ExtensionRendered.php @@ -6,24 +6,26 @@ use Illuminate\Broadcasting\InteractsWithSockets; use Illuminate\Broadcasting\PresenceChannel; use Illuminate\Broadcasting\PrivateChannel; -use Illuminate\Contracts\Broadcasting\ShouldBroadcast; +use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; -class ExtensionRendered implements ShouldBroadcast +class ExtensionRendered implements ShouldBroadcastNow { - use Dispatchable, InteractsWithSockets, SerializesModels; + use SerializesModels,InteractsWithSockets, Dispatchable; - public $output; + private $data; + private $user_id; /** * Create a new event instance. * * @return void */ - public function __construct($output) + public function __construct($data, $user_id) { - $this->output = $output; + $this->data = $data; + $this->user_id = $user_id; } /** @@ -33,6 +35,11 @@ public function __construct($output) */ public function broadcastOn() { - return new PrivateChannel('channel-name'); + return new PrivateChannel('extension_renderer_' . $this->user_id); + } + + public function broadcastWith() + { + return ['data' => $this->data]; } } diff --git a/app/Http/Controllers/Auth/LogoutController.php b/app/Http/Controllers/Auth/LogoutController.php index 137d2a456..6e9711af9 100644 --- a/app/Http/Controllers/Auth/LogoutController.php +++ b/app/Http/Controllers/Auth/LogoutController.php @@ -29,6 +29,5 @@ public function logout() ->regenerateToken(); hook('logout_successful'); return redirect(route('login')); - } } diff --git a/app/Http/Controllers/Extension/OneController.php b/app/Http/Controllers/Extension/OneController.php index d17371e5d..0e8d657c5 100644 --- a/app/Http/Controllers/Extension/OneController.php +++ b/app/Http/Controllers/Extension/OneController.php @@ -12,6 +12,9 @@ use Illuminate\Routing\Redirector; use Illuminate\Support\Facades\DB; use Illuminate\Support\Str; +use mervick\aesEverywhere\AES256; +use GuzzleHttp\Client; +use App\Models\Token; /** * Class OneController @@ -52,127 +55,80 @@ public function serverSettings() ]); } } - //Check Verification - if ( - array_key_exists("verification", $extension) && - $extension["verification"] != null && - $extension["verification"] != "" - ) { - // Run Function - $extensionDb = []; - foreach ($extension["database"] as $key) { - if (request($key["variable"])) { - $extensionDb[$key["variable"]] = request($key["variable"]); - } elseif ( - $setting = UserSettings::where([ - "user_id" => user()->id, - "server_id" => server()->id, - 'name' => $key["variable"], - ])->first() - ) { - $extensionDb[$key["variable"]] = lDecrypt($setting->value); - } else { - return redirect( - route('extension_server_settings_page', [ - "extension_id" => extension()->id, - "server_id" => server()->id, - "city" => server()->city, - ]) - ) - ->withInput() - ->withErrors([ - "message" => "Eksik parametre girildi.", - ]); - } - } - $extensionDb = json_encode($extensionDb); - $command = sandbox()->command( - $extension["verification"], - $extensionDb - ); - $output = rootSystem()->runCommand($command); - if (isJson($output)) { - $message = json_decode($output); - if (isset($message->message)) { - $output = $message->message; - } - } - $sessions = \App\Models\TmpSession::where( - 'session_id', - session()->getId() - )->get(); - foreach ($sessions as $session) { - session()->put($session->key, $session->value); - $session->delete(); - } - - if (strtolower($output) != "ok" && strtolower($output) != "ok\n") { - return redirect( - route('extension_server_settings_page', [ - "extension_id" => extension()->id, - "server_id" => server()->id, - "city" => server()->city, - ]) - ) - ->withInput() - ->withErrors([ - "message" => $output, - ]); - } - } foreach ($extension["database"] as $key) { $row = DB::table('user_settings')->where([ "user_id" => user()->id, "server_id" => server()->id, 'name' => $key["variable"], ]); - if (request($key["variable"])) { + $variable = request($key["variable"]); + if ($variable) { if ($row->exists()) { - $encKey = - env('APP_KEY') . - user()->id . - extension()->id . - server()->id; - $encrypted = openssl_encrypt( - Str::random(16) . - base64_encode(request($key["variable"])), - 'aes-256-cfb8', - $encKey, - 0, - Str::random(16) - ); + $encKey = env('APP_KEY') . user()->id . server()->id; $row->update([ - "value" => $encrypted, + "value" => AES256::encrypt($variable, $encKey), "updated_at" => Carbon::now(), ]); } else { - $encKey = - env('APP_KEY') . - user()->id . - extension()->id . - server()->id; - $encrypted = openssl_encrypt( - Str::random(16) . - base64_encode(request($key["variable"])), - 'aes-256-cfb8', - $encKey, - 0, - Str::random(16) - ); - + $encKey = env('APP_KEY') . user()->id . server()->id; DB::table("user_settings")->insert([ "id" => Str::uuid(), "server_id" => server()->id, "user_id" => user()->id, "name" => $key["variable"], - "value" => $encrypted, + "value" => AES256::encrypt($variable, $encKey), "created_at" => Carbon::now(), "updated_at" => Carbon::now(), ]); } } } + + //Check Verification + if ( + array_key_exists("verification", $extension) && + $extension["verification"] != null && + $extension["verification"] != "" + ) { + $client = new Client(); + $result = ""; + try { + $res = $client->request('POST', 'http://127.0.0.1:5454/', [ + 'form_params' => [ + "lmntargetFunction" => $extension["verification"], + "extension_id" => extension()->id, + "server_id" => server()->id, + "token" => Token::create(user()->id), + ], + 'timeout' => 5, + ]); + $output = (string) $res->getBody(); + if (isJson($output)) { + $message = json_decode($output); + if (isset($message->message)) { + $result = $message->message; + } + } else { + $result = $output; + } + } catch (\Exception $e) { + $result = $e->getMessage(); + } + if (trim($result) != "ok") { + return redirect( + route('extension_server_settings_page', [ + "extension_id" => extension()->id, + "server_id" => server()->id, + "city" => server()->city, + ]) + ) + ->withInput() + ->withErrors([ + "message" => $result, + ]); + } + } system_log(7, "EXTENSION_SETTINGS_UPDATE", [ "extension_id" => extension()->id, "server_id" => server()->id, @@ -217,14 +173,11 @@ public function serverSettingsPage() ]) ->first(); if ($obj) { - $key = - env('APP_KEY') . - user()->id . - extension()->id . - server()->id; - $decrypted = openssl_decrypt($obj->value, 'aes-256-cfb8', $key); - $stringToDecode = substr($decrypted, 16); - $similar[$item["variable"]] = base64_decode($stringToDecode); + $key = env('APP_KEY') . user()->id . server()->id; + $similar[$item["variable"]] = AES256::decrypt( + $obj->value, + $key + ); } } @@ -251,9 +204,7 @@ public function remove() hook('extension_delete_attempt', extension()); try { shell_exec( - "rm -rf " . - "/liman/extensions/" . - strtolower(extension()->name) + "rm -rf " . "/liman/extensions/" . strtolower(extension()->name) ); } catch (\Exception $exception) { } diff --git a/app/Http/Controllers/Extension/Sandbox/InternalController.php b/app/Http/Controllers/Extension/Sandbox/InternalController.php index 8940cc1f5..2641a51d1 100644 --- a/app/Http/Controllers/Extension/Sandbox/InternalController.php +++ b/app/Http/Controllers/Extension/Sandbox/InternalController.php @@ -15,6 +15,8 @@ use Illuminate\Support\Facades\Log; use Illuminate\Http\Request; use Illuminate\Support\Str; +use App\Events\ExtensionRendered; +use GuzzleHttp\Client; class InternalController extends Controller { @@ -271,8 +273,11 @@ public function getFile() ); // Update Permissions - rootSystem()->fixExtensionPermissions(extension()->id, extension()->name); - + rootSystem()->fixExtensionPermissions( + extension()->id, + extension()->name + ); + system_log(7, "EXTENSION_INTERNAL_RECEIVE_FILE", [ "extension_id" => extension()->id, "server_id" => server()->id, @@ -337,13 +342,16 @@ public function sendNotification() public function sendLog() { - Log::channel('extension')->info( - json_encode([ - "log_id" => request('log_id'), - "message" => base64_encode(request('message')), - "title" => base64_encode(request('title')), - ]) - ); + $client = new Client(); + $client->request('POST', 'http://127.0.0.1:5454/sendLog', [ + 'form_params' => [ + 'log_id' => request('log_id'), + 'message' => base64_encode(request('message')), + 'title' => base64_encode(request('title')), + 'token' => Token::create(user()->id), + ], + ]); + return "🤓"; } /** @@ -373,6 +381,14 @@ public function addProxyConfig() private function checkPermissions() { + if ( + request('system_token') == + file_get_contents("/liman/keys/service.key") && + $_SERVER['REMOTE_ADDR'] == "127.0.0.1" + ) { + return; + } + if ($_SERVER['SERVER_ADDR'] != $_SERVER['REMOTE_ADDR']) { system_log(5, "EXTENSION_INTERNAL_NO_PERMISSION", [ "extension_id" => extension()->id, @@ -385,7 +401,10 @@ private function checkPermissions() ($server = Server::find(request('server_id'))) or abort(404, 'Sunucu Bulunamadi'); - if (!Permission::can($token->user_id, 'server', 'id', $server->id)) { + if ( + !Permission::can($token->user_id, 'server', 'id', $server->id) && + env('LIMAN_RESTRICTED') != true + ) { system_log(7, "EXTENSION_NO_PERMISSION_SERVER", [ "extension_id" => extension()->id, "server_id" => request('server_id'), @@ -395,7 +414,13 @@ private function checkPermissions() ($extension = Extension::find(request('extension_id'))) or abort(404, 'Eklenti Bulunamadi'); if ( - !Permission::can($token->user_id, 'extension', 'id', $extension->id) + !Permission::can( + $token->user_id, + 'extension', + 'id', + $extension->id + ) && + env('LIMAN_RESTRICTED') != true ) { system_log(7, "EXTENSION_NO_PERMISSION_SERVER", [ "extension_id" => extension()->id, diff --git a/app/Http/Controllers/Extension/Sandbox/MainController.php b/app/Http/Controllers/Extension/Sandbox/MainController.php index 0afd37fc8..bee78da78 100644 --- a/app/Http/Controllers/Extension/Sandbox/MainController.php +++ b/app/Http/Controllers/Extension/Sandbox/MainController.php @@ -7,6 +7,7 @@ use App\Models\UserSettings; use App\Models\Permission; use App\Models\Server; +use App\Models\Token; use Carbon\Carbon; use Illuminate\Support\Facades\DB; use Illuminate\Support\Str; @@ -45,91 +46,20 @@ public function API() $page = request('target_function') ? request('target_function') : 'index'; - - $logId = (string) Str::uuid(); - - $this->sandbox->setLogId($logId); - - list($output, $timestamp) = $this->executeSandbox($page); - - // Find the function in file. TODO find better solution here. - $extension = json_decode( - file_get_contents( - "/liman/extensions/" . - strtolower(extension()->name) . - DIRECTORY_SEPARATOR . - "db.json" - ), - true - ); - - $display = false; - if (array_key_exists("functions", $extension)) { - foreach ($extension["functions"] as $function) { - if ($function["name"] == $page) { - $display = array_key_exists("displayLog", $function) - ? $function["displayLog"] - : false; - break; - } - } + $view = "extension_pages.server"; + + if (env('LIMAN_RESTRICTED') == true && !user()->isAdmin()) { + $view = "extension_pages.server_restricted"; } - - system_log(7, "EXTENSION_RENDER_PAGE", [ - "extension_id" => extension()->id, - "server_id" => server()->id, - "view" => $page, - "log_id" => $logId, - "display" => $display, + $token = Token::create(user()->id); + return view($view, [ + "auth_token" => $token, + "tokens" => user() + ->accessTokens() + ->get() + ->toArray(), + "last" => $this->getNavigationServers(), ]); - if (trim($output) == "") { - abort(504, "İstek zaman aşımına uğradı!"); - } - if (request()->wantsJson()) { - $code = 200; - try { - $json = json_decode($output, true); - if (array_key_exists("status", $json)) { - $code = intval($json["status"]); - } - } catch (\Exception $exception) { - } - if (isJson($output)) { - return response()->json(json_decode($output), $code); - } - return response($output, $code); - } else { - // Let's check output is json or not. - $json = json_decode($output, true); - if (json_last_error() == JSON_ERROR_NONE && is_array($json)) { - $output = view('l.alert', [ - "title" => extension()->name, - "message" => array_key_exists("message", $json) - ? $json["message"] - : "Bilinmeyen bir hata oluştu, lütfen eklenti geliştiricisi ile iletişime geçiniz.", - "type" => - array_key_exists("status", $json) && - intval($json["status"]) > 200 - ? "danger" - : "info", - ]); - } - - if (env('LIMAN_RESTRICTED') == true && !user()->isAdmin()) { - return view('extension_pages.server_restricted', [ - "view" => $output, - ]); - } - return view('extension_pages.server', [ - "viewName" => "", - "view" => $output, - "tokens" => user() - ->accessTokens() - ->get() - ->toArray(), - "last" => $this->getNavigationServers(), - ]); - } } private function checkForMissingSettings() @@ -220,9 +150,9 @@ private function executeSandbox($function) } $command = $this->sandbox->command($function); - $before = Carbon::now(); - $output = rootSystem()->runCommand($command); - return [$output, $before->diffInMilliseconds(Carbon::now()) / 1000]; + $random = str_random(16); + rootSystem()->runCommand(user()->id,$command,true,$random); + return $random; } private function getNavigationServers() diff --git a/app/Http/Controllers/Extension/Sandbox/_routes.php b/app/Http/Controllers/Extension/Sandbox/_routes.php index b909eb3e4..bb7da65ad 100644 --- a/app/Http/Controllers/Extension/Sandbox/_routes.php +++ b/app/Http/Controllers/Extension/Sandbox/_routes.php @@ -58,4 +58,4 @@ Route::post( '/lmn/private/reverseProxyRequest', 'Extension\Sandbox\InternalController@addProxyConfig' -)->name('SandboxAddVncProxyConfig'); +)->name('SandboxAddVncProxyConfig'); \ No newline at end of file diff --git a/app/Http/Controllers/Extension/SettingsController.php b/app/Http/Controllers/Extension/SettingsController.php index 44e1becd3..0a639593a 100755 --- a/app/Http/Controllers/Extension/SettingsController.php +++ b/app/Http/Controllers/Extension/SettingsController.php @@ -3,6 +3,7 @@ namespace App\Http\Controllers\Extension; use App\Http\Controllers\Controller; +use App\Models\License; /** * Class SettingsController @@ -41,6 +42,19 @@ public function saveSettings() } } + public function addLicense() + { + $license = License::updateOrCreate( + ['extension_id' => extension()->id], + ['data' => request('license')] + ); + if ($license) { + return respond("Lisans Eklendi"); + } else{ + return respond("Lisans Eklenemiyor!",201); + } + } + // Extension Management Page /** diff --git a/app/Http/Controllers/Extension/_routes.php b/app/Http/Controllers/Extension/_routes.php index fbfd0ab18..9dd580985 100644 --- a/app/Http/Controllers/Extension/_routes.php +++ b/app/Http/Controllers/Extension/_routes.php @@ -80,6 +80,11 @@ ->name('extension_upload') ->middleware('admin'); +// Extension Upload Page +Route::post('/ayarlar/eklentilisans', 'Extension\SettingsController@addLicense') +->name('add_extension_license') +->middleware('admin'); + Route::post( '/ayarlar/eklenti', 'Extension\SettingsController@saveSettings' diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index fd1e163c2..b05c15945 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -5,6 +5,7 @@ use App\Models\LimanRequest; use App\Models\Server; use App\User; +use App\Models\Token; use App\Models\UserSettings; use App\Models\Extension; use App\Models\Widget; @@ -46,6 +47,7 @@ public function index() )->first()->name; } return magicView('index', [ + "token" => Token::create(user()->id), "widgets" => $widgets, "server_count" => Server::all()->count(), "extension_count" => Extension::all()->count(), diff --git a/app/Http/Controllers/Notification/ExternalNotificationController.php b/app/Http/Controllers/Notification/ExternalNotificationController.php index 1f57cb2e2..c43e0c28a 100644 --- a/app/Http/Controllers/Notification/ExternalNotificationController.php +++ b/app/Http/Controllers/Notification/ExternalNotificationController.php @@ -5,6 +5,7 @@ use Illuminate\Http\Request; use App\Models\ExternalNotification; use Illuminate\Support\Str; +use App\Http\Controllers\Controller; class ExternalNotificationController extends Controller { diff --git a/app/Http/Controllers/Server/AddController.php b/app/Http/Controllers/Server/AddController.php index 0e1227d43..81b90092c 100644 --- a/app/Http/Controllers/Server/AddController.php +++ b/app/Http/Controllers/Server/AddController.php @@ -14,6 +14,7 @@ use Illuminate\Support\Str; use App\Models\Notification; use App\Models\UserSettings; +use mervick\aesEverywhere\AES256; class AddController extends Controller { @@ -42,6 +43,10 @@ public function main() return respond("Bu sunucu ismiyle bir sunucu zaten var.", 201); } + if (strlen(request('name')) > 24) { + return respond("Lütfen daha kısa bir sunucu adı girin.",201); + } + // Create object with parameters. $this->server = new Server(); $this->server->fill(request()->all()); @@ -72,31 +77,17 @@ public function main() server()->type == "linux_certificate" ) { $encKey = env('APP_KEY') . user()->id . server()->id; - $encryptedUsername = openssl_encrypt( - Str::random(16) . base64_encode(request('username')), - 'aes-256-cfb8', - $encKey, - 0, - Str::random(16) - ); - $encryptedPassword = openssl_encrypt( - Str::random(16) . base64_encode(request('password')), - 'aes-256-cfb8', - $encKey, - 0, - Str::random(16) - ); UserSettings::create([ "server_id" => $this->server->id, "user_id" => user()->id, "name" => "clientUsername", - "value" => $encryptedUsername, + "value" => AES256::encrypt(request('username'),$encKey), ]); UserSettings::create([ "server_id" => $this->server->id, "user_id" => user()->id, "name" => "clientPassword", - "value" => $encryptedPassword, + "value" => AES256::encrypt(request('password'),$encKey), ]); } elseif (server()->type == "snmp") { $targetValues = [ @@ -109,18 +100,11 @@ public function main() ]; $encKey = env('APP_KEY') . user()->id . server()->id; foreach ($targetValues as $target) { - $encrypted = openssl_encrypt( - Str::random(16) . base64_encode(request($target)), - 'aes-256-cfb8', - $encKey, - 0, - Str::random(16) - ); UserSettings::create([ "server_id" => $this->server->id, "user_id" => user()->id, "name" => $target, - "value" => $encrypted, + "value" => AES256::encrypt(request($target),$encKey), ]); } } diff --git a/app/Http/Controllers/Server/MainController.php b/app/Http/Controllers/Server/MainController.php index a6cc828e7..08697ae13 100644 --- a/app/Http/Controllers/Server/MainController.php +++ b/app/Http/Controllers/Server/MainController.php @@ -32,6 +32,9 @@ public function checkAccess() public function verifyName() { + if (strlen(request('server_name')) > 24) { + return respond("Lütfen daha kısa bir sunucu adı girin.",201); + } if (!Server::where('name', request('server_name'))->exists()) { return respond("İsim Onaylandı.", 200); } else { diff --git a/app/Http/Controllers/Server/OneController.php b/app/Http/Controllers/Server/OneController.php index 7a4ec1b28..f764d8e91 100644 --- a/app/Http/Controllers/Server/OneController.php +++ b/app/Http/Controllers/Server/OneController.php @@ -174,6 +174,10 @@ public function enableExtension() public function update() { + if (strlen(request('name')) > 24) { + return respond("Lütfen daha kısa bir sunucu adı girin.",201); + } + if (server()->name !== request('name')) { Notification::new( __("Server Adı Güncellemesi"), @@ -1062,13 +1066,6 @@ public function upgradeServer() // Add credentials $encKey = env('APP_KEY') . user()->id . server()->id; - $encrypted = openssl_encrypt( - Str::random(16) . base64_encode(request('username')), - 'aes-256-cfb8', - $encKey, - 0, - Str::random(16) - ); UserSettings::updateOrCreate( [ "user_id" => user()->id, @@ -1076,17 +1073,10 @@ public function upgradeServer() "name" => "clientUsername", ], [ - "value" => $encrypted, + "value" => AES256::encrypt(request('username'),$encKey), ] ); - $encrypted = openssl_encrypt( - Str::random(16) . base64_encode(request('password')), - 'aes-256-cfb8', - $encKey, - 0, - Str::random(16) - ); UserSettings::updateOrCreate( [ "user_id" => user()->id, @@ -1094,7 +1084,7 @@ public function upgradeServer() "name" => "clientPassword", ], [ - "value" => $encrypted, + "value" => AES256::encrypt(request('password'),$encKey), ] ); diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index dcc8a673e..05ef626a3 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -12,6 +12,7 @@ use Illuminate\Support\Str; use Illuminate\Support\Facades\Hash; use App\Models\ConnectorToken; +use mervick\aesEverywhere\AES256; class UserController extends Controller { @@ -30,7 +31,7 @@ public function add() hook('user_add_attempt', [ "request" => request()->all(), ]); - + request()->request->add(['email' => strtolower(request('email'))]); $flag = Validator::make(request()->all(), [ 'name' => ['required', 'string', 'max:255'], 'email' => [ @@ -45,7 +46,7 @@ public function add() try { $flag->validate(); } catch (\Exception $exception) { - return respond("Lütfen geçerli veri giriniz.", 201); + return respond("Lütfen geçerli veri giriniz. " . $exception->getMessage(), 201); } // Check If user already exists. @@ -72,7 +73,7 @@ public function add() // Create And Fill User Data $user = User::create([ 'name' => request('name'), - 'email' => request('email'), + 'email' => strtolower(request('email')), 'password' => Hash::make($password), 'status' => request('type') == "administrator" ? "1" : "0", 'forceChange' => true, @@ -362,14 +363,9 @@ public function updateSetting() } } - $encKey = env('APP_KEY') . $setting->user_id . $setting->server_id; - $encrypted = openssl_encrypt( - Str::random(16) . base64_encode(request('new_value')), - 'aes-256-cfb8', - $encKey, - 0, - Str::random(16) - ); + $key = env('APP_KEY') . $setting->user_id . $setting->server_id; + $encrypted = AES256::encrypt(request('new_value'),$key); + $flag = $setting->update([ "value" => $encrypted, ]); @@ -492,31 +488,17 @@ public function addKey() ])->delete(); $encKey = env('APP_KEY') . user()->id . server()->id; - $encryptedUsername = openssl_encrypt( - Str::random(16) . base64_encode(request('username')), - 'aes-256-cfb8', - $encKey, - 0, - Str::random(16) - ); - $encryptedPassword = openssl_encrypt( - Str::random(16) . base64_encode(request('password')), - 'aes-256-cfb8', - $encKey, - 0, - Str::random(16) - ); UserSettings::create([ "server_id" => server()->id, "user_id" => user()->id, "name" => "clientUsername", - "value" => $encryptedUsername, + "value" => AES256::encrypt(request('username'),$encKey), ]); UserSettings::create([ "server_id" => server()->id, "user_id" => user()->id, "name" => "clientPassword", - "value" => $encryptedPassword, + "value" => AES256::encrypt(request('password'),$encKey), ]); ConnectorToken::clear(); return respond("Başarıyla eklendi."); diff --git a/app/Http/Helpers.php b/app/Http/Helpers.php index 160323e61..38d9a9c0b 100755 --- a/app/Http/Helpers.php +++ b/app/Http/Helpers.php @@ -18,6 +18,8 @@ use Illuminate\Support\Str; use Jenssegers\Blade\Blade; use App\System\Helper; +use mervick\aesEverywhere\AES256; + if (!function_exists('respond')) { /** * @param $message @@ -592,9 +594,7 @@ function extensionDb($key = "*") ->first(); if ($target) { $key = env('APP_KEY') . auth()->user()->id . server()->id; - $decrypted = openssl_decrypt($target->value, 'aes-256-cfb8', $key); - $stringToDecode = substr($decrypted, 16); - return base64_decode($stringToDecode); + return AES256::decrypt($target->value,$key); } return null; } @@ -825,9 +825,7 @@ function checkHealth() function lDecrypt($data) { $key = env('APP_KEY') . user()->id . server()->id; - $decrypted = openssl_decrypt($data, 'aes-256-cfb8', $key); - $stringToDecode = substr($decrypted, 16); - return base64_decode($stringToDecode); + return AES256::decrypt($data,$key); } } diff --git a/app/Http/Middleware/RestrictedMode.php b/app/Http/Middleware/RestrictedMode.php index 31718737f..1f9bbe2ff 100644 --- a/app/Http/Middleware/RestrictedMode.php +++ b/app/Http/Middleware/RestrictedMode.php @@ -25,6 +25,8 @@ public function handle($request, Closure $next) "password_change", "password_change_save", "set_locale", + "notifications_read", + "user_notifications", ]; if (env('LIMAN_RESTRICTED') == true && user() && !user()->isAdmin()) { $request->request->add([ @@ -37,7 +39,10 @@ public function handle($request, Closure $next) env('LIMAN_RESTRICTED_EXTENSION') ), ]); - if (!in_array(\Request::route()->getName(), $safeRoutes)) { + if ( + !in_array(\Request::route()->getName(), $safeRoutes) && + substr(\Request::route()->uri(), 0, 11) != "lmn/private" + ) { return redirect()->route("extension_server", [ "extension_id" => env('LIMAN_RESTRICTED_EXTENSION'), "server_id" => env('LIMAN_RESTRICTED_SERVER'), diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php index cdee67d19..eb00d7741 100644 --- a/app/Http/Middleware/VerifyCsrfToken.php +++ b/app/Http/Middleware/VerifyCsrfToken.php @@ -32,5 +32,6 @@ class VerifyCsrfToken extends Middleware "/lmn/private/stopTunnel", "/lmn/private/sendNotification", "/lmn/private/sendLog", + "/lmn/private/extensionRenderedHandler" ]; } diff --git a/app/Jobs/ExtensionJob.php b/app/Jobs/ExtensionJob.php index 624f76e9b..cc35c5f02 100644 --- a/app/Jobs/ExtensionJob.php +++ b/app/Jobs/ExtensionJob.php @@ -11,6 +11,7 @@ use App\Models\Token; use Illuminate\Support\Str; use App\Models\Permission; +use mervick\aesEverywhere\AES256; class ExtensionJob implements ShouldQueue { @@ -62,7 +63,7 @@ public function handle() { $command = $this->sandbox->command($this->function); - $output = rootSystem()->runCommand($command); + $output = rootSystem()->runCommand("",$command,false); // system_log(7, "EXTENSION_BACKGROUND_RUN", [ // "extension_id" => $this->extension->id, @@ -118,14 +119,8 @@ private function sandbox( $extensionDb = []; foreach ($settings->get() as $setting) { $key = - env('APP_KEY') . $user_id . $extension_id . $serverObj->id; - $decrypted = openssl_decrypt( - $setting->value, - 'aes-256-cfb8', - $key - ); - $stringToDecode = substr($decrypted, 16); - $extensionDb[$setting->name] = base64_decode($stringToDecode); + env('APP_KEY') . $user_id . $serverObj->id; + $extensionDb[$setting->name] = AES256::decrypt($setting->value,$key); } } diff --git a/app/Models/License.php b/app/Models/License.php new file mode 100644 index 000000000..fbd726534 --- /dev/null +++ b/app/Models/License.php @@ -0,0 +1,12 @@ +registerPolicies(); Gate::define('viewWebSocketsDashboard', function ($user = null) { - return false; + return true; }); } } diff --git a/app/Sandboxes/PHPSandbox.php b/app/Sandboxes/PHPSandbox.php index 5b5d2d3fc..fc632fa4b 100644 --- a/app/Sandboxes/PHPSandbox.php +++ b/app/Sandboxes/PHPSandbox.php @@ -6,6 +6,7 @@ use App\Models\Token; use Illuminate\Support\Str; use App\Models\UserSettings; +use mervick\aesEverywhere\AES256; class PHPSandbox implements Sandbox { @@ -62,15 +63,8 @@ public function command($function, $extensionDb = null) $key = env('APP_KEY') . $this->user->id . - $this->extension->id . $this->server->id; - $decrypted = openssl_decrypt( - $setting->value, - 'aes-256-cfb8', - $key - ); - $stringToDecode = substr($decrypted, 16); - $extensionDb[$setting->name] = base64_decode($stringToDecode); + $extensionDb[$setting->name] = AES256::decrypt($setting->value,$key); } $extensionDb = json_encode($extensionDb); @@ -152,10 +146,10 @@ public function command($function, $extensionDb = null) $navigationRoute, $token, $permissions, - session('locale'), - json_encode($userData), + // session('locale'), + // json_encode($userData), $publicPath, - $isAjax, + // $isAjax, $this->logId, ]; diff --git a/app/Sandboxes/PythonSandbox.php b/app/Sandboxes/PythonSandbox.php index 2a664be4e..e1f55e03c 100644 --- a/app/Sandboxes/PythonSandbox.php +++ b/app/Sandboxes/PythonSandbox.php @@ -6,6 +6,7 @@ use App\Models\Token; use App\Models\UserSettings; use Illuminate\Support\Str; +use mervick\aesEverywhere\AES256; class PythonSandbox implements Sandbox { @@ -62,11 +63,8 @@ public function command($function, $extensionDb = null) $key = env('APP_KEY') . $this->user->id . - $this->extension->id . $this->server->id; - $decrypted = openssl_decrypt($setting->value, 'aes-256-cfb8', $key); - $stringToDecode = substr($decrypted, 16); - $extensionDb[$setting->name] = base64_decode($stringToDecode); + $extensionDb[$setting->name] = AES256::decrypt($setting->value,$key); } $extensionDb = json_encode($extensionDb); diff --git a/app/System/Helper.php b/app/System/Helper.php index eaa7e3121..ac0b380a0 100644 --- a/app/System/Helper.php +++ b/app/System/Helper.php @@ -110,17 +110,20 @@ public function fixExtensionPermissions($extension_id, $extension_name) return true; } - public function runCommand($command) + public function runCommand($user_id, $command,$background = true, $handler = null) { try{ $response = $this->client->get('/extensionRun',[ 'query' => [ 'liman_token' => $this->authKey, 'command' => $command, + 'background' => $background ? "true" : "false", + 'user_id' => $user_id, + 'handler' => $handler ] ]); }catch(\Exception $e){ - return "Unknown System Error"; + return __("Liman Sistem Servisine Erişilemiyor!"); } return $response->getBody()->getContents(); } diff --git a/composer.json b/composer.json index b27cbbd47..73c62617b 100644 --- a/composer.json +++ b/composer.json @@ -23,6 +23,7 @@ "jenssegers/blade": "^1.3", "laravel/framework": "^6.0", "laravel/helpers": "*", + "mervick/aes-everywhere": "^1.1", "phpseclib/phpseclib": "^2.0", "pusher/pusher-php-server": "~3.0" }, diff --git a/composer.lock b/composer.lock index e2c49b8a0..d6ac5c04e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0831ea5127ee882a76a20f0c657adf49", + "content-hash": "3a4326a07657d38058b97c8851a6ef88", "packages": [ { "name": "ankitpokhrel/tus-php", @@ -68,16 +68,16 @@ }, { "name": "beyondcode/laravel-websockets", - "version": "1.4.1", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/beyondcode/laravel-websockets.git", - "reference": "d7b996381d5c3a223f13b69cf35eb43cc6633fca" + "reference": "bbd48d3c728e2e12e4a4fa5c37c33daf81187958" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/beyondcode/laravel-websockets/zipball/d7b996381d5c3a223f13b69cf35eb43cc6633fca", - "reference": "d7b996381d5c3a223f13b69cf35eb43cc6633fca", + "url": "https://api.github.com/repos/beyondcode/laravel-websockets/zipball/bbd48d3c728e2e12e4a4fa5c37c33daf81187958", + "reference": "bbd48d3c728e2e12e4a4fa5c37c33daf81187958", "shasum": "" }, "require": { @@ -142,7 +142,7 @@ "beyondcode", "laravel-websockets" ], - "time": "2020-04-01T10:05:44+00:00" + "time": "2020-08-19T06:40:55+00:00" }, { "name": "cboden/ratchet", @@ -538,20 +538,20 @@ }, { "name": "doctrine/event-manager", - "version": "1.1.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/doctrine/event-manager.git", - "reference": "629572819973f13486371cb611386eb17851e85c" + "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/event-manager/zipball/629572819973f13486371cb611386eb17851e85c", - "reference": "629572819973f13486371cb611386eb17851e85c", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/41370af6a30faa9dc0368c4a6814d596e81aba7f", + "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "conflict": { "doctrine/common": "<2.9@dev" @@ -610,7 +610,21 @@ "event system", "events" ], - "time": "2019-11-10T09:48:07+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fevent-manager", + "type": "tidelift" + } + ], + "time": "2020-05-29T18:28:51+00:00" }, { "name": "doctrine/inflector", @@ -835,16 +849,16 @@ }, { "name": "egulias/email-validator", - "version": "2.1.18", + "version": "2.1.19", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "cfa3d44471c7f5bfb684ac2b0da7114283d78441" + "reference": "840d5603eb84cc81a6a0382adac3293e57c1c64c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/cfa3d44471c7f5bfb684ac2b0da7114283d78441", - "reference": "cfa3d44471c7f5bfb684ac2b0da7114283d78441", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/840d5603eb84cc81a6a0382adac3293e57c1c64c", + "reference": "840d5603eb84cc81a6a0382adac3293e57c1c64c", "shasum": "" }, "require": { @@ -889,7 +903,7 @@ "validation", "validator" ], - "time": "2020-06-16T20:11:17+00:00" + "time": "2020-08-08T21:28:19+00:00" }, { "name": "evenement/evenement", @@ -1174,16 +1188,16 @@ }, { "name": "icewind/smb", - "version": "v3.2.5", + "version": "v3.2.6", "source": { "type": "git", "url": "https://github.com/icewind1991/SMB.git", - "reference": "80921d69f5e47157c825f0bdac6c838fe0b901b2" + "reference": "507b186800ac6c3b287604a4ff9b138cf430da79" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/icewind1991/SMB/zipball/80921d69f5e47157c825f0bdac6c838fe0b901b2", - "reference": "80921d69f5e47157c825f0bdac6c838fe0b901b2", + "url": "https://api.github.com/repos/icewind1991/SMB/zipball/507b186800ac6c3b287604a4ff9b138cf430da79", + "reference": "507b186800ac6c3b287604a4ff9b138cf430da79", "shasum": "" }, "require": { @@ -1197,8 +1211,7 @@ "type": "library", "autoload": { "psr-4": { - "Icewind\\SMB\\": "src/", - "Icewind\\SMB\\Test\\": "tests/" + "Icewind\\SMB\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1212,7 +1225,7 @@ } ], "description": "php wrapper for smbclient and libsmbclient-php", - "time": "2020-05-27T13:56:04+00:00" + "time": "2020-07-20T14:12:51+00:00" }, { "name": "icewind/streams", @@ -1304,16 +1317,16 @@ }, { "name": "laravel/framework", - "version": "v6.18.25", + "version": "v6.18.35", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "fd4c42cb49b8777473d1161ef15d1104b2a33d6c" + "reference": "baec6c2d7f433594cb858c35c2a2946df7ecac13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/fd4c42cb49b8777473d1161ef15d1104b2a33d6c", - "reference": "fd4c42cb49b8777473d1161ef15d1104b2a33d6c", + "url": "https://api.github.com/repos/laravel/framework/zipball/baec6c2d7f433594cb858c35c2a2946df7ecac13", + "reference": "baec6c2d7f433594cb858c35c2a2946df7ecac13", "shasum": "" }, "require": { @@ -1448,7 +1461,7 @@ "framework", "laravel" ], - "time": "2020-07-10T16:41:03+00:00" + "time": "2020-08-07T15:06:09+00:00" }, { "name": "laravel/helpers", @@ -1505,16 +1518,16 @@ }, { "name": "league/commonmark", - "version": "1.5.1", + "version": "1.5.4", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "6d74caf6abeed5fd85d6ec20da23d7269cd0b46f" + "reference": "21819c989e69bab07e933866ad30c7e3f32984ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/6d74caf6abeed5fd85d6ec20da23d7269cd0b46f", - "reference": "6d74caf6abeed5fd85d6ec20da23d7269cd0b46f", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/21819c989e69bab07e933866ad30c7e3f32984ba", + "reference": "21819c989e69bab07e933866ad30c7e3f32984ba", "shasum": "" }, "require": { @@ -1533,7 +1546,7 @@ "michelf/php-markdown": "~1.4", "mikehaertl/php-shellcommand": "^1.4", "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^7.5", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.2", "scrutinizer/ocular": "^1.5", "symfony/finder": "^4.2" }, @@ -1596,32 +1609,33 @@ "type": "tidelift" } ], - "time": "2020-06-27T12:50:08+00:00" + "time": "2020-08-18T01:19:12+00:00" }, { "name": "league/flysystem", - "version": "1.0.69", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "7106f78428a344bc4f643c233a94e48795f10967" + "reference": "9be3b16c877d477357c015cec057548cf9b2a14a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/7106f78428a344bc4f643c233a94e48795f10967", - "reference": "7106f78428a344bc4f643c233a94e48795f10967", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/9be3b16c877d477357c015cec057548cf9b2a14a", + "reference": "9be3b16c877d477357c015cec057548cf9b2a14a", "shasum": "" }, "require": { "ext-fileinfo": "*", - "php": ">=5.5.9" + "league/mime-type-detection": "^1.3", + "php": "^7.2.5 || ^8.0" }, "conflict": { "league/flysystem-sftp": "<1.0.6" }, "require-dev": { - "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7.26" + "phpspec/prophecy": "^1.11.1", + "phpunit/phpunit": "^8.5.8" }, "suggest": { "ext-fileinfo": "Required for MimeType", @@ -1686,20 +1700,108 @@ "type": "other" } ], - "time": "2020-05-18T15:13:39+00:00" + "time": "2020-08-23T07:39:11+00:00" + }, + { + "name": "league/mime-type-detection", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/mime-type-detection.git", + "reference": "fda190b62b962d96a069fcc414d781db66d65b69" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/fda190b62b962d96a069fcc414d781db66d65b69", + "reference": "fda190b62b962d96a069fcc414d781db66d65b69", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.36", + "phpunit/phpunit": "^8.5.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\MimeTypeDetection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Mime-type detection for Flysystem", + "funding": [ + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" + } + ], + "time": "2020-08-09T10:34:01+00:00" + }, + { + "name": "mervick/aes-everywhere", + "version": "v1.1.3", + "source": { + "type": "git", + "url": "https://github.com/mervick/aes-everywhere.git", + "reference": "5b0078aa579b5f4775979ec9a1b8b3c8c2debdbc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mervick/aes-everywhere/zipball/5b0078aa579b5f4775979ec9a1b8b3c8c2debdbc", + "reference": "5b0078aa579b5f4775979ec9a1b8b3c8c2debdbc", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "^5" + }, + "type": "library", + "autoload": { + "psr-4": { + "mervick\\aesEverywhere\\tests\\": "php//tests//", + "mervick\\aesEverywhere\\": "php//src//" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andrey Izman", + "email": "izmanw@gmail.com" + } + ], + "description": "Aes Everywhere - Cross Language Encryption Library (AES/256/CBC/PKCS5)", + "time": "2019-09-15T19:41:29+00:00" }, { "name": "monolog/monolog", - "version": "2.1.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "38914429aac460e8e4616c8cb486ecb40ec90bb1" + "reference": "f9eee5cec93dfb313a38b6b288741e84e53f02d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/38914429aac460e8e4616c8cb486ecb40ec90bb1", - "reference": "38914429aac460e8e4616c8cb486ecb40ec90bb1", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f9eee5cec93dfb313a38b6b288741e84e53f02d5", + "reference": "f9eee5cec93dfb313a38b6b288741e84e53f02d5", "shasum": "" }, "require": { @@ -1777,20 +1879,20 @@ "type": "tidelift" } ], - "time": "2020-05-22T08:12:19+00:00" + "time": "2020-07-23T08:41:23+00:00" }, { "name": "nesbot/carbon", - "version": "2.36.1", + "version": "2.38.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "ee7378a36cc62952100e718bcc58be4c7210e55f" + "reference": "d8f6a6a91d1eb9304527b040500f61923e97674b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/ee7378a36cc62952100e718bcc58be4c7210e55f", - "reference": "ee7378a36cc62952100e718bcc58be4c7210e55f", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/d8f6a6a91d1eb9304527b040500f61923e97674b", + "reference": "d8f6a6a91d1eb9304527b040500f61923e97674b", "shasum": "" }, "require": { @@ -1805,7 +1907,7 @@ "kylekatarnls/multi-tester": "^2.0", "phpmd/phpmd": "^2.8", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.30", + "phpstan/phpstan": "^0.12.35", "phpunit/phpunit": "^7.5 || ^8.0", "squizlabs/php_codesniffer": "^3.4" }, @@ -1866,20 +1968,20 @@ "type": "tidelift" } ], - "time": "2020-07-04T12:29:56+00:00" + "time": "2020-08-04T19:12:46+00:00" }, { "name": "opis/closure", - "version": "3.5.5", + "version": "3.5.6", "source": { "type": "git", "url": "https://github.com/opis/closure.git", - "reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c" + "reference": "e8d34df855b0a0549a300cb8cb4db472556e8aa9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/dec9fc5ecfca93f45cd6121f8e6f14457dff372c", - "reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c", + "url": "https://api.github.com/repos/opis/closure/zipball/e8d34df855b0a0549a300cb8cb4db472556e8aa9", + "reference": "e8d34df855b0a0549a300cb8cb4db472556e8aa9", "shasum": "" }, "require": { @@ -1927,7 +2029,7 @@ "serialization", "serialize" ], - "time": "2020-06-17T14:59:55+00:00" + "time": "2020-08-11T08:46:50+00:00" }, { "name": "paragonie/random_compat", @@ -2058,24 +2160,24 @@ }, { "name": "phpoption/phpoption", - "version": "1.7.4", + "version": "1.7.5", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3" + "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3", - "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/994ecccd8f3283ecf5ac33254543eb0ac946d525", + "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525", "shasum": "" }, "require": { "php": "^5.5.9 || ^7.0 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.3", - "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0" + "bamarni/composer-bin-plugin": "^1.4.1", + "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0 || ^8.0 || ^9.0" }, "type": "library", "extra": { @@ -2119,7 +2221,7 @@ "type": "tidelift" } ], - "time": "2020-06-07T10:40:07+00:00" + "time": "2020-07-20T17:29:33+00:00" }, { "name": "phpseclib/phpseclib", @@ -2229,22 +2331,23 @@ }, { "name": "predis/predis", - "version": "v1.1.1", + "version": "v1.1.3", "source": { "type": "git", - "url": "https://github.com/nrk/predis.git", - "reference": "f0210e38881631afeafb56ab43405a92cafd9fd1" + "url": "https://github.com/predis/predis.git", + "reference": "2ce537d75e610550f5337e41b2a971417999b028" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nrk/predis/zipball/f0210e38881631afeafb56ab43405a92cafd9fd1", - "reference": "f0210e38881631afeafb56ab43405a92cafd9fd1", + "url": "https://api.github.com/repos/predis/predis/zipball/2ce537d75e610550f5337e41b2a971417999b028", + "reference": "2ce537d75e610550f5337e41b2a971417999b028", "shasum": "" }, "require": { "php": ">=5.3.9" }, "require-dev": { + "cweagans/composer-patches": "^1.6", "phpunit/phpunit": "~4.8" }, "suggest": { @@ -2252,6 +2355,18 @@ "ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol" }, "type": "library", + "extra": { + "composer-exit-on-patch-failure": true, + "patches": { + "phpunit/phpunit-mock-objects": { + "Fix PHP 7 and 8 compatibility": "./tests/phpunit_mock_objects.patch" + }, + "phpunit/phpunit": { + "Fix PHP 7 compatibility": "./tests/phpunit_php7.patch", + "Fix PHP 8 compatibility": "./tests/phpunit_php8.patch" + } + } + }, "autoload": { "psr-4": { "Predis\\": "src/" @@ -2265,17 +2380,29 @@ { "name": "Daniele Alessandri", "email": "suppakilla@gmail.com", - "homepage": "http://clorophilla.net" + "homepage": "http://clorophilla.net", + "role": "Creator & Maintainer" + }, + { + "name": "Till Krüss", + "homepage": "https://till.im", + "role": "Maintainer" } ], "description": "Flexible and feature-complete Redis client for PHP and HHVM", - "homepage": "http://github.com/nrk/predis", + "homepage": "http://github.com/predis/predis", "keywords": [ "nosql", "predis", "redis" ], - "time": "2016-06-16T16:22:20+00:00" + "funding": [ + { + "url": "https://github.com/sponsors/tillkruss", + "type": "github" + } + ], + "time": "2020-08-18T21:00:59+00:00" }, { "name": "psr/container", @@ -3245,16 +3372,16 @@ }, { "name": "symfony/console", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "326b064d804043005526f5a0494cfb49edb59bb0" + "reference": "55d07021da933dd0d633ffdab6f45d5b230c7e02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/326b064d804043005526f5a0494cfb49edb59bb0", - "reference": "326b064d804043005526f5a0494cfb49edb59bb0", + "url": "https://api.github.com/repos/symfony/console/zipball/55d07021da933dd0d633ffdab6f45d5b230c7e02", + "reference": "55d07021da933dd0d633ffdab6f45d5b230c7e02", "shasum": "" }, "require": { @@ -3332,11 +3459,11 @@ "type": "tidelift" } ], - "time": "2020-05-30T20:06:45+00:00" + "time": "2020-07-06T13:18:39+00:00" }, { "name": "symfony/css-selector", - "version": "v5.1.2", + "version": "v5.1.3", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -3403,16 +3530,16 @@ }, { "name": "symfony/debug", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "28f92d08bb6d1fddf8158e02c194ad43870007e6" + "reference": "47aa9064d75db36389692dd4d39895a0820f00f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/28f92d08bb6d1fddf8158e02c194ad43870007e6", - "reference": "28f92d08bb6d1fddf8158e02c194ad43870007e6", + "url": "https://api.github.com/repos/symfony/debug/zipball/47aa9064d75db36389692dd4d39895a0820f00f2", + "reference": "47aa9064d75db36389692dd4d39895a0820f00f2", "shasum": "" }, "require": { @@ -3470,20 +3597,20 @@ "type": "tidelift" } ], - "time": "2020-05-24T08:33:35+00:00" + "time": "2020-07-23T08:31:43+00:00" }, { "name": "symfony/error-handler", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "0df9a23c0f9eddbb6682479fee6fd58b88add75b" + "reference": "66f151360550ec2b3273b3746febb12e6ba0348b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/0df9a23c0f9eddbb6682479fee6fd58b88add75b", - "reference": "0df9a23c0f9eddbb6682479fee6fd58b88add75b", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/66f151360550ec2b3273b3746febb12e6ba0348b", + "reference": "66f151360550ec2b3273b3746febb12e6ba0348b", "shasum": "" }, "require": { @@ -3541,20 +3668,20 @@ "type": "tidelift" } ], - "time": "2020-05-28T10:39:14+00:00" + "time": "2020-07-23T08:35:20+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "a5370aaa7807c7a439b21386661ffccf3dff2866" + "reference": "6140fc7047dafc5abbe84ba16a34a86c0b0229b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a5370aaa7807c7a439b21386661ffccf3dff2866", - "reference": "a5370aaa7807c7a439b21386661ffccf3dff2866", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/6140fc7047dafc5abbe84ba16a34a86c0b0229b8", + "reference": "6140fc7047dafc5abbe84ba16a34a86c0b0229b8", "shasum": "" }, "require": { @@ -3625,7 +3752,7 @@ "type": "tidelift" } ], - "time": "2020-05-20T08:37:50+00:00" + "time": "2020-06-18T17:59:13+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -3705,20 +3832,20 @@ }, { "name": "symfony/finder", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "5729f943f9854c5781984ed4907bbb817735776b" + "reference": "2727aa35fddfada1dd37599948528e9b152eb742" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/5729f943f9854c5781984ed4907bbb817735776b", - "reference": "5729f943f9854c5781984ed4907bbb817735776b", + "url": "https://api.github.com/repos/symfony/finder/zipball/2727aa35fddfada1dd37599948528e9b152eb742", + "reference": "2727aa35fddfada1dd37599948528e9b152eb742", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.1.3" }, "type": "library", "extra": { @@ -3764,20 +3891,20 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:54:36+00:00" + "time": "2020-07-05T09:39:30+00:00" }, { "name": "symfony/http-foundation", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "3adfbd7098c850b02d107330b7b9deacf2581578" + "reference": "3675676b6a47f3e71d3ab10bcf53fb9239eb77e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/3adfbd7098c850b02d107330b7b9deacf2581578", - "reference": "3adfbd7098c850b02d107330b7b9deacf2581578", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/3675676b6a47f3e71d3ab10bcf53fb9239eb77e6", + "reference": "3675676b6a47f3e71d3ab10bcf53fb9239eb77e6", "shasum": "" }, "require": { @@ -3833,20 +3960,20 @@ "type": "tidelift" } ], - "time": "2020-05-23T09:11:46+00:00" + "time": "2020-07-23T09:48:09+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "81d42148474e1852a333ed7a732f2a014af75430" + "reference": "a675d2bf04a9328f164910cae6e3918b295151f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/81d42148474e1852a333ed7a732f2a014af75430", - "reference": "81d42148474e1852a333ed7a732f2a014af75430", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/a675d2bf04a9328f164910cae6e3918b295151f3", + "reference": "a675d2bf04a9328f164910cae6e3918b295151f3", "shasum": "" }, "require": { @@ -3938,20 +4065,20 @@ "type": "tidelift" } ], - "time": "2020-06-12T11:15:37+00:00" + "time": "2020-07-24T04:10:09+00:00" }, { "name": "symfony/mime", - "version": "v5.1.2", + "version": "v5.1.3", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "c0c418f05e727606e85b482a8591519c4712cf45" + "reference": "149fb0ad35aae3c7637b496b38478797fa6a7ea6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/c0c418f05e727606e85b482a8591519c4712cf45", - "reference": "c0c418f05e727606e85b482a8591519c4712cf45", + "url": "https://api.github.com/repos/symfony/mime/zipball/149fb0ad35aae3c7637b496b38478797fa6a7ea6", + "reference": "149fb0ad35aae3c7637b496b38478797fa6a7ea6", "shasum": "" }, "require": { @@ -4015,11 +4142,11 @@ "type": "tidelift" } ], - "time": "2020-06-09T15:07:35+00:00" + "time": "2020-07-23T10:04:31+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.18.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -4095,7 +4222,7 @@ }, { "name": "symfony/polyfill-iconv", - "version": "v1.18.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", @@ -4172,16 +4299,16 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.18.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "bc6549d068d0160e0f10f7a5a23c7d1406b95ebe" + "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/bc6549d068d0160e0f10f7a5a23c7d1406b95ebe", - "reference": "bc6549d068d0160e0f10f7a5a23c7d1406b95ebe", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/5dcab1bc7146cf8c1beaa4502a3d9be344334251", + "reference": "5dcab1bc7146cf8c1beaa4502a3d9be344334251", "shasum": "" }, "require": { @@ -4253,11 +4380,11 @@ "type": "tidelift" } ], - "time": "2020-07-14T12:35:20+00:00" + "time": "2020-08-04T06:02:08+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.18.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -4338,7 +4465,7 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.18.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", @@ -4415,7 +4542,7 @@ }, { "name": "symfony/polyfill-php70", - "version": "v1.18.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php70.git", @@ -4492,7 +4619,7 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.18.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", @@ -4565,7 +4692,7 @@ }, { "name": "symfony/polyfill-php73", - "version": "v1.18.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", @@ -4641,7 +4768,7 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.18.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", @@ -4721,20 +4848,20 @@ }, { "name": "symfony/process", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "c714958428a85c86ab97e3a0c96db4c4f381b7f5" + "reference": "65e70bab62f3da7089a8d4591fb23fbacacb3479" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/c714958428a85c86ab97e3a0c96db4c4f381b7f5", - "reference": "c714958428a85c86ab97e3a0c96db4c4f381b7f5", + "url": "https://api.github.com/repos/symfony/process/zipball/65e70bab62f3da7089a8d4591fb23fbacacb3479", + "reference": "65e70bab62f3da7089a8d4591fb23fbacacb3479", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.1.3" }, "type": "library", "extra": { @@ -4780,7 +4907,7 @@ "type": "tidelift" } ], - "time": "2020-05-30T20:06:45+00:00" + "time": "2020-07-23T08:31:43+00:00" }, { "name": "symfony/psr-http-message-bridge", @@ -4862,20 +4989,20 @@ }, { "name": "symfony/routing", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "0f557911dde75c2a9652b8097bd7c9f54507f646" + "reference": "e103381a4c2f0731c14589041852bf979e97c7af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/0f557911dde75c2a9652b8097bd7c9f54507f646", - "reference": "0f557911dde75c2a9652b8097bd7c9f54507f646", + "url": "https://api.github.com/repos/symfony/routing/zipball/e103381a4c2f0731c14589041852bf979e97c7af", + "reference": "e103381a4c2f0731c14589041852bf979e97c7af", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.1.3" }, "conflict": { "symfony/config": "<4.2", @@ -4948,7 +5075,7 @@ "type": "tidelift" } ], - "time": "2020-05-30T20:07:26+00:00" + "time": "2020-07-05T09:39:30+00:00" }, { "name": "symfony/service-contracts", @@ -5028,16 +5155,16 @@ }, { "name": "symfony/translation", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "79d3ef9096a6a6047dbc69218b68c7b7f63193af" + "reference": "a8ea9d97353294eb6783f2894ef8cee99a045822" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/79d3ef9096a6a6047dbc69218b68c7b7f63193af", - "reference": "79d3ef9096a6a6047dbc69218b68c7b7f63193af", + "url": "https://api.github.com/repos/symfony/translation/zipball/a8ea9d97353294eb6783f2894ef8cee99a045822", + "reference": "a8ea9d97353294eb6783f2894ef8cee99a045822", "shasum": "" }, "require": { @@ -5114,7 +5241,7 @@ "type": "tidelift" } ], - "time": "2020-05-30T20:06:45+00:00" + "time": "2020-07-23T08:31:43+00:00" }, { "name": "symfony/translation-contracts", @@ -5193,16 +5320,16 @@ }, { "name": "symfony/var-dumper", - "version": "v4.4.10", + "version": "v4.4.11", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "56b3aa5eab0ac6720dcd559fd1d590ce301594ac" + "reference": "2125805a1a4e57f2340bc566c3013ca94d2722dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/56b3aa5eab0ac6720dcd559fd1d590ce301594ac", - "reference": "56b3aa5eab0ac6720dcd559fd1d590ce301594ac", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/2125805a1a4e57f2340bc566c3013ca94d2722dc", + "reference": "2125805a1a4e57f2340bc566c3013ca94d2722dc", "shasum": "" }, "require": { @@ -5280,7 +5407,7 @@ "type": "tidelift" } ], - "time": "2020-05-30T20:06:45+00:00" + "time": "2020-06-24T13:34:53+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -5408,39 +5535,42 @@ "packages-dev": [ { "name": "barryvdh/laravel-ide-helper", - "version": "v2.7.0", + "version": "v2.8.0", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-ide-helper.git", - "reference": "5f677edc14bdcfdcac36633e6eea71b2728a4dbc" + "reference": "ba95d18ef55c91295250ae8b7bfa73d8fb866b9b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/5f677edc14bdcfdcac36633e6eea71b2728a4dbc", - "reference": "5f677edc14bdcfdcac36633e6eea71b2728a4dbc", + "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/ba95d18ef55c91295250ae8b7bfa73d8fb866b9b", + "reference": "ba95d18ef55c91295250ae8b7bfa73d8fb866b9b", "shasum": "" }, "require": { "barryvdh/reflection-docblock": "^2.0.6", - "composer/composer": "^1.6", + "composer/composer": "^1.6 || ^2.0@dev", "doctrine/dbal": "~2.3", - "illuminate/console": "^5.5|^6|^7", - "illuminate/filesystem": "^5.5|^6|^7", - "illuminate/support": "^5.5|^6|^7", - "php": ">=7.2" + "illuminate/console": "^5.5 || ^6 || ^7", + "illuminate/filesystem": "^5.5 || ^6 || ^7", + "illuminate/support": "^5.5 || ^6 || ^7", + "php": ">=7.2", + "phpdocumentor/type-resolver": "^1.1.0" }, "require-dev": { - "illuminate/config": "^5.5|^6|^7", - "illuminate/view": "^5.5|^6|^7", + "illuminate/config": "^5.5 || ^6 || ^7", + "illuminate/view": "^5.5 || ^6 || ^7", "mockery/mockery": "^1.3", - "orchestra/testbench": "^3|^4|^5", - "phpro/grumphp": "^0.17.1", - "squizlabs/php_codesniffer": "^3" + "orchestra/testbench": "^3.5 || ^4 || ^5", + "phpro/grumphp": "^0.19.0", + "spatie/phpunit-snapshot-assertions": "^1.4 || ^2.2 || ^3", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^3.12" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.7-dev" }, "laravel": { "providers": [ @@ -5481,7 +5611,7 @@ "type": "github" } ], - "time": "2020-04-22T09:57:26+00:00" + "time": "2020-08-10T08:22:48+00:00" }, { "name": "barryvdh/reflection-docblock", @@ -5534,16 +5664,16 @@ }, { "name": "composer/ca-bundle", - "version": "1.2.7", + "version": "1.2.8", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "95c63ab2117a72f48f5a55da9740a3273d45b7fd" + "reference": "8a7ecad675253e4654ea05505233285377405215" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/95c63ab2117a72f48f5a55da9740a3273d45b7fd", - "reference": "95c63ab2117a72f48f5a55da9740a3273d45b7fd", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/8a7ecad675253e4654ea05505233285377405215", + "reference": "8a7ecad675253e4654ea05505233285377405215", "shasum": "" }, "require": { @@ -5591,25 +5721,29 @@ "url": "https://packagist.com", "type": "custom" }, + { + "url": "https://github.com/composer", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/composer/composer", "type": "tidelift" } ], - "time": "2020-04-08T08:27:21+00:00" + "time": "2020-08-23T12:54:47+00:00" }, { "name": "composer/composer", - "version": "1.10.8", + "version": "1.10.10", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "56e0e094478f30935e9128552188355fa9712291" + "reference": "32966a3b1d48bc01472a8321fd6472b44fad033a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/56e0e094478f30935e9128552188355fa9712291", - "reference": "56e0e094478f30935e9128552188355fa9712291", + "url": "https://api.github.com/repos/composer/composer/zipball/32966a3b1d48bc01472a8321fd6472b44fad033a", + "reference": "32966a3b1d48bc01472a8321fd6472b44fad033a", "shasum": "" }, "require": { @@ -5690,7 +5824,7 @@ "type": "tidelift" } ], - "time": "2020-06-24T19:23:30+00:00" + "time": "2020-08-03T09:35:19+00:00" }, { "name": "composer/spdx-licenses", @@ -5768,16 +5902,16 @@ }, { "name": "composer/xdebug-handler", - "version": "1.4.2", + "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "fa2aaf99e2087f013a14f7432c1cd2dd7d8f1f51" + "reference": "ebd27a9866ae8254e873866f795491f02418c5a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/fa2aaf99e2087f013a14f7432c1cd2dd7d8f1f51", - "reference": "fa2aaf99e2087f013a14f7432c1cd2dd7d8f1f51", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ebd27a9866ae8254e873866f795491f02418c5a5", + "reference": "ebd27a9866ae8254e873866f795491f02418c5a5", "shasum": "" }, "require": { @@ -5822,7 +5956,7 @@ "type": "tidelift" } ], - "time": "2020-06-04T11:16:35+00:00" + "time": "2020-08-19T10:27:58+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -6439,16 +6573,16 @@ }, { "name": "mockery/mockery", - "version": "1.4.1", + "version": "1.4.2", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "1404386ca3410b04fe58b9517e85d702ab33b2c6" + "reference": "20cab678faed06fac225193be281ea0fddb43b93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/1404386ca3410b04fe58b9517e85d702ab33b2c6", - "reference": "1404386ca3410b04fe58b9517e85d702ab33b2c6", + "url": "https://api.github.com/repos/mockery/mockery/zipball/20cab678faed06fac225193be281ea0fddb43b93", + "reference": "20cab678faed06fac225193be281ea0fddb43b93", "shasum": "" }, "require": { @@ -6460,7 +6594,7 @@ "phpunit/phpunit": "<8.0" }, "require-dev": { - "phpunit/phpunit": "^8.5 || ^9.0" + "phpunit/phpunit": "^8.5 || ^9.3" }, "type": "library", "extra": { @@ -6503,7 +6637,7 @@ "test double", "testing" ], - "time": "2020-07-09T08:31:54+00:00" + "time": "2020-08-11T18:10:13+00:00" }, { "name": "myclabs/deep-copy", @@ -6561,16 +6695,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.6.0", + "version": "v4.9.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "c346bbfafe2ff60680258b631afb730d186ed864" + "reference": "aaee038b912e567780949787d5fe1977be11a778" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c346bbfafe2ff60680258b631afb730d186ed864", - "reference": "c346bbfafe2ff60680258b631afb730d186ed864", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/aaee038b912e567780949787d5fe1977be11a778", + "reference": "aaee038b912e567780949787d5fe1977be11a778", "shasum": "" }, "require": { @@ -6578,8 +6712,8 @@ "php": ">=7.0" }, "require-dev": { - "ircmaxell/php-yacc": "0.0.5", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0" + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -6587,7 +6721,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "4.9-dev" } }, "autoload": { @@ -6609,7 +6743,7 @@ "parser", "php" ], - "time": "2020-07-02T17:12:47+00:00" + "time": "2020-08-18T19:48:01+00:00" }, { "name": "nunomaduro/collision", @@ -6828,28 +6962,27 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.1.0", + "version": "5.2.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e" + "reference": "d870572532cd70bc3fab58f2e23ad423c8404c44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", - "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d870572532cd70bc3fab58f2e23ad423c8404c44", + "reference": "d870572532cd70bc3fab58f2e23ad423c8404c44", "shasum": "" }, "require": { - "ext-filter": "^7.1", - "php": "^7.2", - "phpdocumentor/reflection-common": "^2.0", - "phpdocumentor/type-resolver": "^1.0", - "webmozart/assert": "^1" + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" }, "require-dev": { - "doctrine/instantiator": "^1", - "mockery/mockery": "^1" + "mockery/mockery": "~1.3.2" }, "type": "library", "extra": { @@ -6877,7 +7010,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2020-02-22T12:28:44+00:00" + "time": "2020-08-15T11:14:08+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -7237,6 +7370,7 @@ "keywords": [ "tokenizer" ], + "abandoned": true, "time": "2019-09-17T06:23:10+00:00" }, { @@ -8098,16 +8232,16 @@ }, { "name": "seld/jsonlint", - "version": "1.8.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "ff2aa5420bfbc296cf6a0bc785fa5b35736de7c1" + "reference": "3d5eb71705adfa34bd34b993400622932b2f62fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/ff2aa5420bfbc296cf6a0bc785fa5b35736de7c1", - "reference": "ff2aa5420bfbc296cf6a0bc785fa5b35736de7c1", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/3d5eb71705adfa34bd34b993400622932b2f62fd", + "reference": "3d5eb71705adfa34bd34b993400622932b2f62fd", "shasum": "" }, "require": { @@ -8153,7 +8287,7 @@ "type": "tidelift" } ], - "time": "2020-04-30T19:05:18+00:00" + "time": "2020-08-13T09:07:59+00:00" }, { "name": "seld/phar-utils", @@ -8201,16 +8335,16 @@ }, { "name": "spatie/laravel-web-tinker", - "version": "1.7.3", + "version": "1.7.4", "source": { "type": "git", "url": "https://github.com/spatie/laravel-web-tinker.git", - "reference": "c90511803c749cf3161d54525490e5e09c5315e5" + "reference": "18cb5b4b2645a778ce356caabe09af556f277fc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-web-tinker/zipball/c90511803c749cf3161d54525490e5e09c5315e5", - "reference": "c90511803c749cf3161d54525490e5e09c5315e5", + "url": "https://api.github.com/repos/spatie/laravel-web-tinker/zipball/18cb5b4b2645a778ce356caabe09af556f277fc4", + "reference": "18cb5b4b2645a778ce356caabe09af556f277fc4", "shasum": "" }, "require": { @@ -8265,11 +8399,11 @@ "type": "custom" } ], - "time": "2020-05-07T18:03:37+00:00" + "time": "2020-07-23T18:41:41+00:00" }, { "name": "symfony/filesystem", - "version": "v5.1.2", + "version": "v5.1.3", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", diff --git a/database/migrations/2020_08_12_104025_change_encryption_alghoritm.php b/database/migrations/2020_08_12_104025_change_encryption_alghoritm.php new file mode 100644 index 000000000..f7fbe30cb --- /dev/null +++ b/database/migrations/2020_08_12_104025_change_encryption_alghoritm.php @@ -0,0 +1,38 @@ +user_id . $setting->server_id; + $decrypted = openssl_decrypt($setting->value, 'aes-256-cfb8', $key); + $stringToDecode = substr($decrypted, 16); + $password = base64_decode($stringToDecode); + $setting->update([ + "value" => AES256::encrypt($password, $key) + ]); + } + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +} diff --git a/database/migrations/2020_08_19_130408_create_licenses_table.php b/database/migrations/2020_08_19_130408_create_licenses_table.php new file mode 100644 index 000000000..8f5fd357d --- /dev/null +++ b/database/migrations/2020_08_19_130408_create_licenses_table.php @@ -0,0 +1,38 @@ +uuid('id')->primary(); + $table->string('data'); + $table->uuid("extension_id"); + $table + ->foreign("extension_id") + ->references("id") + ->on("extensions") + ->onDelete("cascade"); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('licenses'); + } +} diff --git a/public/js/liman.js b/public/js/liman.js index edbccbf23..cd51edaa4 100644 --- a/public/js/liman.js +++ b/public/js/liman.js @@ -81641,16 +81641,27 @@ function request(e, t, i, n, o = "POST") { (t = new FormData(t))) : (r = t.has("id") ? t.get("id") : null), null != r && showSwal("Yükleniyor...", "info"), - (modalData = t); + (modalData = t), + (e.startsWith(window.location.origin + "/extensionRun/") || + e.startsWith("/extensionRun/")) && + (t.append("lmntargetFunction", e.split("/extensionRun/")[1]), + (e = window.location.origin + "/extensionRun/")); var s = $("meta[name=server_id]").attr("content"), a = $("meta[name=extension_id]").attr("content"); "" != s && t.append("server_id", s), "" != a && t.append("extension_id", a); for (const [e, i] of Object.entries(customRequestData)) t.append(e, i); - if ((t.append("limanJSRequest", !0), limanRecordRequests)) { + if ( + (t.append("lmnbaseurl", window.location.origin), + t.append("limanJSRequest", !0), + new URLSearchParams(window.location.search).forEach(function (e, i) { + t.append(i, e); + }), + limanRecordRequests) + ) { var l = {}; for (var c of t.entries()) l[c[0]] = c[1]; limanRequestList.push({ - target: e.substring(e.lastIndexOf("/") + 1), + target: t.get("lmntargetFunction"), url: e, form: l, }); @@ -81699,14 +81710,30 @@ function request(e, t, i, n, o = "POST") { !1 ); } +function handlerCleanup(e) { + setTimeout(() => { + (window[e] = void 0), delete window[e]; + }, 1e3); +} +function isJson(e) { + try { + JSON.parse(e); + } catch (e) { + return !1; + } + return !0; +} function limanRequestBuilder(e, t) { + var i = "curl"; return ( - "curl -d '" + - JSON.stringify(limanRequestList[e].form) + - '\' -H "Content-Type: application/json" -H "Accept: application/json" -H "liman-token: ' + - t + - '" -X POST ' + - limanRequestList[e].url + $.each(limanRequestList[e].form, function (e, t) { + i += " -F '" + e + "=" + t + "'"; + }), + i + + ' -H "Content-Type: multipart/form-data" -H "Accept: application/json" -H "liman-token: ' + + t + + '" -X POST ' + + limanRequestList[e].url ); } function reload() { diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 7133cff3c..a5d4b6a45 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,4 +1,4 @@ { "/css/liman.css": "/css/liman.css?id=defedb66f8a8b13bdeb3", - "/js/liman.js": "/js/liman.js?id=a5ecc4baf8723faf6caa" + "/js/liman.js": "/js/liman.js?id=f7501181e7a17e8cb884" } diff --git a/resources/assets/js/liman.js b/resources/assets/js/liman.js index cbd0fecb8..6c6bac238 100644 --- a/resources/assets/js/liman.js +++ b/resources/assets/js/liman.js @@ -33,6 +33,13 @@ function request(url, data, next, error, requestType = "POST") { } modalData = data; + if ( + url.startsWith(window.location.origin + "/extensionRun/") || + url.startsWith("/extensionRun/") + ) { + data.append("lmntargetFunction", url.split("/extensionRun/")[1]); + url = window.location.origin + "/extensionRun/"; + } var server_id = $("meta[name=server_id]").attr("content"); var extension_id = $("meta[name=extension_id]").attr("content"); @@ -43,14 +50,20 @@ function request(url, data, next, error, requestType = "POST") { for (const [key, value] of Object.entries(customRequestData)) { data.append(key, value); } + data.append("lmnbaseurl", window.location.origin); data.append("limanJSRequest", true); + var urlParams = new URLSearchParams(window.location.search); + urlParams.forEach(function (value, key) { + data.append(key, value); + }); + if (limanRecordRequests) { var parsed = {}; for (var pair of data.entries()) { parsed[pair[0]] = pair[1]; } limanRequestList.push({ - target: url.substring(url.lastIndexOf("/") + 1), + target: data.get("lmntargetFunction"), url: url, form: parsed, }); @@ -107,12 +120,31 @@ function request(url, data, next, error, requestType = "POST") { return false; } +function handlerCleanup(name) { + setTimeout(() => { + window[name] = undefined; + delete window[name]; + }, 1000); +} + +function isJson(str) { + try { + JSON.parse(str); + } catch (e) { + return false; + } + return true; +} + function limanRequestBuilder(index, token) { - var str = JSON.stringify(limanRequestList[index]["form"]); + var str = "curl"; + $.each(limanRequestList[index]["form"], function (index, value) { + str += " -F '" + index + "=" + value + "'"; + }); + return ( - "curl -d '" + str + - '\' -H "Content-Type: application/json" -H "Accept: application/json" -H "liman-token: ' + + ' -H "Content-Type: multipart/form-data" -H "Accept: application/json" -H "liman-token: ' + token + '" -X POST ' + limanRequestList[index]["url"] diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 873a5f5ae..efe9fc23f 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -59,7 +59,23 @@ -
+
+
+ +
+
+
+ +
+
+ +
+ +
+
+

+
+