Connect-CMS has Arbitrary Code Execution by an Authenticated User in its Code Study Plugin
Description
Connect-CMS is a content management system. In versions on the 1.x series up to and including 1.41.0 and versions on the 2.x series up to and including 2.41.0, an authenticated user may be able to execute arbitrary code in the Code Study Plugin. Versions 1.41.1 and 2.41.1 contain a patch.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Authenticated users can execute arbitrary code via the Code Study Plugin in Connect-CMS versions 1.x ≤1.41.0 and 2.x ≤2.41.0.
Vulnerability
Overview
Connect-CMS, a content management system, contains a code execution vulnerability in the Code Study Plugin. Affected versions are 1.x up to and including 1.41.0, and 2.x up to and including 2.41.0 [1]. An authenticated user may be able to execute arbitrary code through this plugin [1].
Exploitation
To exploit this vulnerability, an attacker must have a valid user account on the Connect-CMS instance. The attack can be carried out by using the Code Study Plugin, which does not properly sanitize or restrict inputs, allowing injection of arbitrary code [1]. No other prerequisites are mentioned.
Impact
Successful exploitation allows an authenticated attacker to execute arbitrary code on the server, potentially leading to full compromise of the CMS installation [1].
Mitigation
The issue has been addressed in versions 1.41.1 and 2.41.1 [2][3], with a corresponding commit fixing the root cause [4]. Users are strongly advised to upgrade to the latest patched versions.
AI Insight generated on May 18, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
opensource-workshop/connect-cmsPackagist | < 1.41.1 | 1.41.1 |
opensource-workshop/connect-cmsPackagist | >= 2.0.0, < 2.41.1 | 2.41.1 |
Affected products
2- Range: 1.x <=1.41.0, 2.x <=2.41.0
- opensource-workshop/connect-cmsv5Range: < 1.41.1
Patches
1c0bcd07fc1e9Fix: GHSA-hxqw-6qv7-cqfv
12 files changed · +163 −797
app/Models/User/Codestudies/Codestudies.php+0 −17 removed@@ -1,17 +0,0 @@ -<?php - -namespace App\Models\User\Codestudies; - -use Illuminate\Database\Eloquent\Model; -use Illuminate\Database\Eloquent\SoftDeletes; - -use App\Userable; - -class Codestudies extends Model -{ - // 論理削除 - use SoftDeletes; - - // 保存時のユーザー関連データの保持 - use Userable; -}
app/Plugins/User/Codestudies/CodestudiesPlugin.php+0 −542 removed@@ -1,542 +0,0 @@ -<?php - -namespace App\Plugins\User\Codestudies; - -use Illuminate\Support\Facades\Auth; -use Illuminate\Support\Facades\Log; -use Illuminate\Support\Facades\Storage; -use Illuminate\Support\Facades\Validator; - -use DB; - -use App\Models\Common\Buckets; -use App\Models\Common\Frame; -use App\Models\Common\Page; -use App\Models\User\Codestudies\Codestudies; - -use App\Enums\CsvCharacterCode; - -use App\Plugins\User\UserPluginBase; - -/** - * コードスタディプラグイン - * - * @author 永原 篤 <nagahara@opensource-workshop.jp> - * @copyright OpenSource-WorkShop Co.,Ltd. All Rights Reserved - * @category コードスタディプラグイン - * @package Contoroller - */ -class CodestudiesPlugin extends UserPluginBase -{ - - /* オブジェクト変数 */ - - /** - * 変更時のPOSTデータ - */ - public $post = null; - - /** - * 実行関数チェック - */ - private $run_check_msgs = null; - - /* コアから呼び出す関数 */ - - /** - * 関数定義(コアから呼び出す) - */ - public function getPublicFunctions() - { - // 標準関数以外で画面などから呼ばれる関数の定義 - $functions = array(); - $functions['get'] = ['editcode', 'viewDownload', 'download']; - $functions['post'] = ['savecode', 'run', 'deletecode']; - return $functions; - } - - /** - * 追加の権限定義(コアから呼び出す) - */ - public function declareRole() - { - // 標準権限以外で設定画面などから呼ばれる権限の定義 - // 標準権限は右記で定義 config/cc_role.php - // - // 権限チェックテーブル - // [TODO] 【各プラグイン】declareRoleファンクションで適切な追加の権限定義を設定する https://github.com/opensource-workshop/connect-cms/issues/658 - $role_ckeck_table = array(); - $role_ckeck_table["editcode"] = array('role_reporter'); - $role_ckeck_table["savecode"] = array('role_reporter'); - $role_ckeck_table["run"] = array('role_reporter'); - $role_ckeck_table["deletecode"] = array('role_reporter'); - $role_ckeck_table["download"] = array('role_arrangement'); - $role_ckeck_table["viewDownload"] = array('role_arrangement'); - return $role_ckeck_table; - } - - /** - * 使用言語のバージョン取得 - */ - private function getLangVersion() - { - $versions = array(); - // PHP - $versions['PHP'] = phpversion(); - // Java - $cmd = 'javac -encoding UTF-8 -version'; - exec("$cmd 2>&1", $result); - // バージョン取得ががうまくいった場合($result が空) - if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { - $versions['Java'] = mb_convert_encoding(implode('<br />', $result), "UTF-8", "sjis-win"); - } else { - $versions['Java'] = implode('<br />', $result); - } - - return $versions; - } - - /** - * POST取得関数(コアから呼び出す) - * コアがPOSTチェックの際に呼び出す関数 - */ - public function getPost($id) - { - - // 一度読んでいれば、そのPOSTを再利用する。 - if (!empty($this->post)) { - return $this->post; - } - - // コード取得 - $this->post = Codestudies::where('id', $id)->first(); - - return $this->post; - } - - /* 画面アクション関数 */ - - /** - * データ初期表示関数 - * コアがページ表示の際に呼び出す関数 - */ - public function index($request, $page_id, $frame_id, $errors = null) - { - // セッション初期化などのLaravel 処理。 - $request->flash(); - - // 認証されているユーザの取得 - $user = Auth::user(); - - // ログイン - if (empty($user) || empty($user->id)) { - // 認証エラーテンプレートを呼び出す。 - return $this->view( - 'codestudies_forbidden', [ - ] - ); - } - - // 自分の保存したプログラムを取得 - $codestudies = Codestudies::where('created_id', $user->id)->get(); - - // 画面で空を表示させるために、空のオブジェクトを生成 - $codestudy = new Codestudies(); - - // 表示テンプレートを呼び出す。 - return $this->view( - 'codestudies', [ - 'codestudies' => $codestudies, - 'codestudy' => $codestudy, - 'errors' => $errors, - 'versions' => $this->getLangVersion(), - ] - )->withInput($request->all); - } - - /** - * 編集画面 - */ - public function editcode($request, $page_id, $frame_id, $codestudy_id = null, $result = null, $error_flag = null, $errors = null) - { - // セッション初期化などのLaravel 処理。 - $request->flash(); - - // 認証されているユーザの取得 - $user = Auth::user(); - - // ログイン - if (empty($user) || empty($user->id)) { - // 認証エラーテンプレートを呼び出す。 - return $this->view( - 'codestudies_forbidden', [ - ] - ); - } - - // 自分のコード全て - $codestudies = Codestudies::where('created_id', $user->id)->get(); - - // コード取得 - $codestudy = $this->getPost($codestudy_id); - - // if (empty($codestudy)) { - // $codestudy = new Codestudies(); - // } - - - // 変更画面を呼び出す。(blade でold を使用するため、withInput 使用) - return $this->view( - 'codestudies', [ - 'codestudies' => $codestudies, - 'codestudy' => $codestudy, - 'result' => $result, - 'error_flag' => $error_flag, - 'errors' => $errors, - 'run_check_msgs' => $this->run_check_msgs, - 'versions' => $this->getLangVersion(), - ] - )->withInput($request->all); - } - - /** - * 保存処理 - */ - private function saveImpl($request, $page_id, $frame_id, $codestudy_id) - { - // id があれば更新、なければ登録 - if (empty($codestudy_id)) { - $codestudies = new Codestudies(); - } else { - $codestudies = Codestudies::where('id', $codestudy_id)->first(); - } - - // コード設定 - $codestudies->title = $request->title; - $codestudies->study_lang = $request->study_lang; - $codestudies->code_text = $request->code_text; - $codestudies->created_id = Auth::user()->id; - - // データ保存 - $codestudies->save(); - - // id を返却 - return $codestudies->id; - } - - /** - * 保存画面処理 - */ - public function savecode($request, $page_id, $frame_id, $codestudy_id) - { - - // 項目のエラーチェック - $validator = Validator::make($request->all(), [ - 'code_text' => ['required'], - 'study_lang' => ['required'], - ]); - $validator->setAttributeNames([ - 'code_text' => 'コード', - 'study_lang' => '言語', - ]); - - // エラーがあった場合は入力画面に戻る。 - if ($validator->fails()) { - if ($codestudy_id) { - return $this->editcode($request, $page_id, $frame_id, $codestudy_id, null, null, $validator->errors()); - } else { - return $this->index($request, $page_id, $frame_id, $validator->errors()); - } - } - - // データ保存 - $codestudy_id = $this->saveImpl($request, $page_id, $frame_id, $codestudy_id); - - // 登録後は表示用の初期処理を呼ぶ。 - return $this->editcode($request, $page_id, $frame_id, $codestudy_id); - } - - /** - * 実行可否の判定 - */ - private function runCheck($codestudy) - { - // 禁止関数 - $deny_method = array(); - $deny_method['php'][] = array('method'=>'dl', 'check_str'=>'dl('); - $deny_method['php'][] = array('method'=>'exec', 'check_str'=>'exec('); - $deny_method['php'][] = array('method'=>'fsockopen', 'check_str'=>'fsockopen('); - $deny_method['php'][] = array('method'=>'passthru', 'check_str'=>'passthru('); - $deny_method['php'][] = array('method'=>'pcntl_exec', 'check_str'=>'pcntl_exec('); - $deny_method['php'][] = array('method'=>'pfsockopen', 'check_str'=>'pfsockopen('); - $deny_method['php'][] = array('method'=>'phpinfo', 'check_str'=>'phpinfo('); - $deny_method['php'][] = array('method'=>'popen', 'check_str'=>'popen('); - $deny_method['php'][] = array('method'=>'proc_open', 'check_str'=>'proc_open('); - $deny_method['php'][] = array('method'=>'shell_exec', 'check_str'=>'shell_exec('); - $deny_method['php'][] = array('method'=>'stream_socket_client', 'check_str'=>'stream_socket_client('); - $deny_method['php'][] = array('method'=>'system', 'check_str'=>'system('); - - // 戻り値 - $return = array(); - - // コードからスペースを取り除く - $code_text_trim_space = str_replace(' ', '', $codestudy->code_text); - - // エラーチェック - if (array_key_exists($codestudy->study_lang, $deny_method)) { - foreach ($deny_method[$codestudy->study_lang] as $check_method) { - if (stripos($code_text_trim_space, $check_method['check_str']) !== false) { - $return[] = "「" . $check_method['method'] . "」が実行される可能性のあるプログラムは実行できません。"; - } - } - } - //return $return; - - $this->run_check_msgs = $return; - - return; - } - - /** - * Java クラス名抜き出し - */ - private function getClassName($codestudy) - { - $tmp_code = trim($codestudy->code_text, "\n"); - $tmp_code = trim($tmp_code, "\r"); - - $tmp_code = substr($tmp_code, strpos($tmp_code, 'class') + 5, strpos($tmp_code, '{') - strpos($tmp_code, 'class') - 5); - - $tmp_code = trim(mb_convert_kana($tmp_code, 'as', 'UTF-8')); - $tmp_code = preg_replace('/[^0-9a-zA-Z]/', '', $tmp_code); - - return $tmp_code; - } - - /** - * 実行処理 - */ - public function run($request, $page_id, $frame_id, $codestudy_id) - { - // 権限チェック(run 関数は標準チェックにないので、独自チェック) - //if ($this->can('posts.update', $this->getPost($codestudy_id))) { - // return $this->viewError(403); - //} - - // 項目のエラーチェック - $validator = Validator::make($request->all(), [ - 'code_text' => ['required'], - 'study_lang' => ['required'], - ]); - $validator->setAttributeNames([ - 'code_text' => 'コード', - 'study_lang' => '言語', - ]); - - // エラーがあった場合は入力画面に戻る。 - if ($validator->fails()) { - if ($codestudy_id) { - return $this->editcode($request, $page_id, $frame_id, $codestudy_id, null, null, $validator->errors()); - } else { - return $this->index($request, $page_id, $frame_id, $validator->errors()); - } - } - - // データ保存 - $codestudy_id = $this->saveImpl($request, $page_id, $frame_id, $codestudy_id); - - // コード取得 - $codestudy = Codestudies::where('id', $codestudy_id)->first(); - - // ファイルに出力 - //Storage::put('codestudy/' . $codestudy_id . '.php', $codestudy->code_text); - Storage::makeDirectory('codestudy/' . $codestudy->created_id . '/' . $codestudy_id); - - $class_name = ""; - - // 言語判定 - if ($codestudy->study_lang == 'php') { - Storage::put('codestudy/' . $codestudy->created_id . '/' . $codestudy_id . '/' . $codestudy_id . '.php', $codestudy->code_text); - } elseif ($codestudy->study_lang == 'java') { - $class_name = $this->getClassName($codestudy); - Storage::put('codestudy/' . $codestudy->created_id . '/' . $codestudy_id . '/' . $class_name . '.java', $codestudy->code_text); - } - - // 実行可否の判定 - $error_flag = null; - //$error_msg = $this->runCheck($codestudy); - $error_msg = array(); - - $this->runCheck($codestudy); - - //if ($error_msg) { - if ($this->run_check_msgs) { - // エラーメッセージを返す。 - $error_flag = 1; - $result = $error_msg; - } else { - $cmd = ''; - - if ($codestudy->study_lang == 'php') { - // PHP 実行 - $cmd = 'php ' . storage_path('app/codestudy/' . $codestudy->created_id . '/' . $codestudy_id . '/' . $codestudy_id . '.php'); - //$cmd = 'php -l ' . storage_path('app/codestudy/' . $codestudy_id . '.php'); - - if (!empty($cmd)) { - exec("$cmd 2>&1", $result); - } - } elseif ($codestudy->study_lang == 'javascript') { - $result = $codestudy; - } elseif ($codestudy->study_lang == 'java') { - // コンパイル - $cmd = 'javac -encoding UTF-8 ' . storage_path('app/codestudy/' . $codestudy->created_id . '/' . $codestudy_id . '/' . $class_name . '.java'); - if (!empty($cmd)) { - exec("$cmd 2>&1", $result); - //Log::debug($cmd); - //Log::debug($result); - } - - // コンパイルがうまくいった場合($result が空) - if (empty($result)) { - // 実行 - $cmd = 'java -Dfile.encoding=UTF-8 -classpath ' . storage_path('app/codestudy/' . $codestudy->created_id . '/' . $codestudy_id); - $cmd .= ' ' . $class_name; - exec("$cmd 2>&1", $result); - //Log::debug($cmd); - //Log::debug($result); - } - } - } - - // $result 内のプログラム・ファイルパスを編集する。 - $rep_str = storage_path('app\\codestudy\\' . $codestudy->created_id . '\\' . $codestudy_id . '\\'); - foreach ($result as &$result_item) { - $result_item = str_replace($rep_str, '', $result_item); - } - - // 登録後は表示用の初期処理を呼ぶ。 - return $this->editcode($request, $page_id, $frame_id, $codestudy_id, $result, $error_flag); - } - - /** - * 削除処理 - */ - public function deletecode($request, $page_id, $frame_id, $codestudy_id) - { - // id がある場合、データを削除 - if ($codestudy_id) { - // データを削除する。 - Codestudies::where('id', $codestudy_id)->delete(); - } - // 削除後は表示用の初期処理を呼ぶ。 - return $this->index($request, $page_id, $frame_id); - } - - /** - * 学習結果ダウンロード指示画面 - */ - public function viewDownload($request, $page_id, $frame_id) - { - // 表示テンプレートを呼び出す。 - return $this->view( - 'download', [] - )->withInput($request->all); - } - - /** - * 学習結果ダウンロード実行 - */ - public function download($request, $page_id, $frame_id) - { - - $save_path = $this->getTmpDirectory() . uniqid('', true) . '.zip'; - $this->makeZip($save_path, $request); - - // 一時ファイルは削除して、ダウンロードレスポンスを返す. download()でAllowed memory sizeエラー時にtmpファイル削除対応 - $response = response()->download( - $save_path, - 'StudyCodes.zip', - ['Content-Disposition' => 'filename=StudyCodes.zip'] - ); - // )->deleteFileAfterSend(true); - register_shutdown_function('unlink', $save_path); - return $response; - } - - /** - * ダウンロードするZIPファイルを作成する。 - * - * @param string $save_path 保存先パス - * @param \Illuminate\Http\Request $request リクエスト - */ - private function makeZip($save_path, $request) - { - $zip = new \ZipArchive(); - $zip->open($save_path, \ZipArchive::CREATE); - - // フォルダがないとzipファイルを作れない - if (!is_dir($this->getTmpDirectory())) { - mkdir($this->getTmpDirectory(), 0777, true); - } - - // 学生のコードを取得する。 - // ユーザは削除された場合のことも想定しておく。 - $codestudies = Codestudies::select( - 'codestudies.*', - 'users.userid', - 'users.name', - ) - ->leftJoin('users', 'users.id', '=', 'codestudies.created_id') - ->orderBy('codestudies.created_id', 'asc') - ->orderBy('codestudies.id', 'asc') - ->get(); - - // 学生ループ - $tmp_dir_name = ''; - foreach ($codestudies as $codestudy) { - // 学生用フォルダ。ログインID(学籍番号を想定)で作成 - // もしユーザデータがなかったら、_{$created_id} - $dir = $codestudy->userid; - if (empty($dir)) { - $dir = '_' . $codestudy->created_id; - } - // 学生用フォルダ作成 - if ($tmp_dir_name != $dir) { - $zip->addEmptyDir($dir); - $tmp_dir_name = $dir; - } - // 拡張子 - $ext = ""; - if ($codestudy->study_lang == 'javascript') { - $ext = ".js"; - } elseif ($codestudy->study_lang == 'java') { - $ext = ".java"; - } elseif ($codestudy->study_lang == 'php') { - $ext = ".php"; - } - // コードの保存 - $zip->addFromString($dir . "/" . mb_convert_encoding($codestudy->title, CsvCharacterCode::sjis_win) . $ext, $codestudy->code_text . "\n"); - } - - // 空のZIPファイルが出来たら404 - if ($zip->count() === 0) { - // zipファイル後始末 - $zip->close(); - if (file_exists($save_path)) { - unlink($save_path); - } - abort(404, 'ファイルがありません。'); - } - $zip->close(); - } - - /** - * 一時フォルダのパスを取得する - * - * @return string 一時フォルダのパス - */ - private function getTmpDirectory() - { - return storage_path('app/') . 'tmp/codestudies/'; - } -}
app/Plugins/User/Codestudies/plugin.ini+0 −2 removed@@ -1,2 +0,0 @@ -[plugin_base] -plugin_name_full = コードスタディ
config/connect.php+1 −1 modified@@ -24,7 +24,7 @@ 'manual_voiceid' => env('MANUAL_VOICEID', 'takumi'), // プラグイン管理にも表示しないプラグイン(小文字で指定) - 'PLUGIN_FORCE_HIDDEN' => ['knowledges', 'codestudies'], + 'PLUGIN_FORCE_HIDDEN' => ['knowledges'], // 特別なPath定義(管理画面) 'CC_SPECIAL_PATH_MANAGE' => array_merge(
database/migrations/2026_02_17_000000_drop_codestudies_table.php+41 −0 added@@ -0,0 +1,41 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class DropCodestudiesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::dropIfExists('codestudies'); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::create('codestudies', function (Blueprint $table) { + $table->increments('id'); + $table->string('study_lang'); + $table->text('title')->nullable(); + $table->text('code_text')->nullable(); + $table->integer('created_id')->nullable(); + $table->string('created_name', 255)->nullable(); + $table->timestamps(); + $table->integer('updated_id')->nullable(); + $table->string('updated_name', 255)->nullable(); + $table->integer('deleted_id')->nullable(); + $table->string('deleted_name', 255)->nullable(); + $table->softDeletes(); + }); + } +}
database/migrations/2026_02_17_000000_replace_codestudies_frames_with_contents.php+91 −0 added@@ -0,0 +1,91 @@ +<?php + +use Illuminate\Database\Migrations\Migration; +use Illuminate\Support\Facades\DB; + +class ReplaceCodestudiesFramesWithContents extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::transaction(function () { + $frames = DB::table('frames') + ->select('id', 'page_id', 'frame_title') + ->where('plugin_name', 'codestudies') + ->orderBy('id') + ->get(); + + foreach ($frames as $frame) { + $timestamp = now(); + $bucket_id = DB::table('buckets')->insertGetId([ + 'bucket_name' => $this->getBucketName($frame), + 'plugin_name' => 'contents', + 'container_page_id' => $frame->page_id, + 'created_at' => $timestamp, + 'updated_at' => $timestamp, + ]); + + DB::table('contents')->insert([ + 'bucket_id' => $bucket_id, + 'content_text' => $this->getNoticeMessage(), + 'content2_text' => null, + 'read_more_flag' => 0, + 'read_more_button' => '続きを読む', + 'close_more_button' => '閉じる', + 'status' => 0, + 'created_at' => $timestamp, + 'updated_at' => $timestamp, + ]); + + DB::table('frames') + ->where('id', $frame->id) + ->update([ + 'plugin_name' => 'contents', + 'bucket_id' => $bucket_id, + 'updated_at' => $timestamp, + ]); + } + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // rollback時に変換前のバケツIDを復元できないため、処理しない。 + } + + /** + * 固定記事バケツ名 + * + * @param object $frame + * @return string + */ + private function getBucketName($frame) + { + if (!empty($frame->frame_title)) { + return $frame->frame_title; + } + + return 'コードスタディ廃止のお知らせ'; + } + + /** + * 廃止メッセージ + * + * @return string + */ + private function getNoticeMessage() + { + return '<p>コードスタディプラグインは廃止されました。</p>' + . '<p>このフレームは固定記事に置き換えています。</p>' + . '<p>必要な情報がある場合は、サイト管理者にお問い合わせください。</p>'; + } +}
database/migrations/2026_02_18_000000_remove_codestudies_from_plugins.php+29 −0 added@@ -0,0 +1,29 @@ +<?php + +use Illuminate\Database\Migrations\Migration; +use Illuminate\Support\Facades\DB; + +class RemoveCodestudiesFromPlugins extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + DB::table('plugins') + ->whereRaw('LOWER(plugin_name) = ?', ['codestudies']) + ->delete(); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // 削除済みプラグインの再表示を防ぐため、復元はしない。 + } +}
resources/views/plugins/user/codestudies/codestudies_frame_edit_tab.blade.php+0 −16 removed@@ -1,16 +0,0 @@ -{{-- - * 編集画面tabテンプレート - * - * @author 永原 篤 <nagahara@opensource-workshop.jp> - * @copyright OpenSource-WorkShop Co.,Ltd. All Rights Reserved - * @category コードスタディ・プラグイン - --}} -@if ($action == 'viewDownload') - <li role="presentation" class="nav-item"> - <span class="nav-link"><span class="active">学習結果ダウンロード</span></span> - </li> -@else - <li role="presentation" class="nav-item"> - <a href="{{url('/')}}/plugin/codestudies/viewDownload/{{$page->id}}/{{$frame->id}}#frame-{{$frame->id}}" class="nav-link">学習結果ダウンロード</a> - </li> -@endif
resources/views/plugins/user/codestudies/default/codestudies.blade.php+0 −178 removed@@ -1,178 +0,0 @@ -{{-- - * コードスタディ画面テンプレート。 - * - * @author 永原 篤 <nagahara@opensource-workshop.jp> - * @author 牟田口 満 <mutaguchi@opensource-workshop.jp> - * @copyright OpenSource-WorkShop Co.,Ltd. All Rights Reserved - * @category コードスタディプラグイン - --}} -@extends('core.cms_frame_base') - -@section("plugin_contents_$frame->id") -<script type="text/javascript"> - {{-- 実行のsubmit JavaScript --}} - function submit_codestudies_run() { - form_codestudies.codestudies_run = "1"; - @if ($codestudy->id) - form_codestudies.action = "{{url('/')}}/plugin/codestudies/run/{{$page->id}}/{{$frame_id}}/{{$codestudy->id}}#frame-{{$frame->id}}"; - @else - form_codestudies.action = "{{url('/')}}/plugin/codestudies/run/{{$page->id}}/{{$frame_id}}#frame-{{$frame->id}}"; - @endif - form_codestudies.submit(); - } -</script> - -{{-- 結果があれば表示 --}} -@if (isset($run_check_msgs) && $run_check_msgs) -<div class="panel panel-danger"> - <div class="panel-heading">制限エラー</div> - <div class="panel-body"> - @foreach ($run_check_msgs as $run_check_msg) - {!!$run_check_msg!!}<br /> - @endforeach - </div> -</div> -@endif - -@if (isset($result) && $result) -@if ($error_flag == 1) -<div class="card border-danger"> -@else -<div class="card border-primary mb-3"> -@endif - <div class="card-header">実行結果</div> - <div class="card-body"> - @if ($codestudy->study_lang == 'javascript') - {!!$result->code_text!!} - @else - @foreach ($result as $result_row) - {!!$result_row!!}<br /> - @endforeach - @endif - </div> -</div> -@endif - -@if ($codestudy->id) - <form action="{{url('/')}}/plugin/codestudies/savecode/{{$page->id}}/{{$frame_id}}/{{$codestudy->id}}#frame-{{$frame->id}}" method="POST" name="form_codestudies" class=""> -@else - <form action="{{url('/')}}/plugin/codestudies/savecode/{{$page->id}}/{{$frame_id}}#frame-{{$frame->id}}" method="POST" name="form_codestudies" class=""> -@endif - - {{ csrf_field() }} - - <div class="form-group"> - <label class="control-label">タイトル</label><br /> - <input type="text" name="title" value="{{old('title', $codestudy->title)}}" class="form-control"> - </div> - - <div class="form-group"> - <label class="control-label">コード <label class="badge badge-danger">必須</label></label><br /> - <textarea id="txt_editor" class="form-control" rows="10" name="code_text" style="font-family:'MS ゴシック', 'MS Gothic', 'Osaka-等幅', Osaka-mono, monospace;">{!!old('code_text', $codestudy->code_text)!!}</textarea> - @if ($errors && $errors->has('code_text')) <div class="text-danger">{{$errors->first('code_text')}}</div> @endif - </div> - -@php - $mode = 'javascript()'; - if ($codestudy->study_lang == 'php') { - $mode = 'php()'; - } elseif ($codestudy->study_lang == 'javascript') { - $mode = 'javascript()'; - } elseif ($codestudy->study_lang == 'java') { - $mode = 'java()'; - } -@endphp -@include('plugins.common.codemirror', ['element_id' => 'txt_editor', 'mode' => $mode]) - - <div class="container form-group row mb-2"> - <label class="control-label">言語 <label class="badge badge-danger">必須</span></label><br /> - <div class="card"> - <div class="card-body p-2"> - @if ($codestudy->study_lang == 'java' || old('study_lang') == 'java') - <label class="m-0"><input name="study_lang" type="radio" value="java" checked> Java</label> - @else - <label class="m-0"><input name="study_lang" type="radio" value="java"> Java</label> - @endif - @if ($codestudy->study_lang == 'php' || old('study_lang') == 'php') - <label class="m-0"><input name="study_lang" type="radio" value="php" checked> PHP</label> - @else - <label class="m-0"><input name="study_lang" type="radio" value="php"> PHP</label> - @endif - @if ($codestudy->study_lang == 'javascript' || old('study_lang') == 'javascript') - <label class="m-0"><input name="study_lang" type="radio" value="javascript" checked> JavaScript</label> - @else - <label class="m-0"><input name="study_lang" type="radio" value="javascript"> JavaScript</label> - @endif - </div> - </div> - @if ($errors && $errors->has('study_lang')) <div class="text-danger">{{$errors->first('study_lang')}}</div> @endif - - <a data-toggle="collapse" href="#collapseExample" aria-expanded="false" aria-controls="collapseExample"> - 各言語のバージョン表示 - </a> - </div> - - - <div class="collapse mb-3" id="collapseExample"> - <div class="p-2 CodestudyLanguageVersionFrame"> - @foreach($versions as $language => $version) - <span class="badge badge-info">{{$language}}</span><br /> - <div class="CodestudyLanguageVersion p-2 pl-3"> - {!!$version!!}<br /> - </div> - @endforeach - </div> - </div> - - <div class="form-group"> - <div class="row"> - <div class="col-sm-2"></div> - <div class="col-sm-8 mx-auto"> - <div class="text-center"> - <button type="submit" class="btn btn-success mr-3"><i class="far fa-save"></i> 保存のみ</button> - <button type="button" class="btn btn-primary mr-3" onclick="javascript:submit_codestudies_run();"><i class="fas fa-check"></i> 保存と実行</button> - <button type="button" class="btn btn-secondary" onclick="location.href='{{URL::to($page->permanent_link)}}'"><i class="fas fa-times"></i> キャンセル</button> - </div> - </div> - <div class="col-sm-2"> - @if (!empty($codestudy->id)) - <a data-toggle="collapse" href="#collapse{{$codestudy->id}}"> - <span class="btn btn-danger"><i class="fas fa-trash-alt"></i> <span class="d-none d-sm-inline">削除</span></span> - </a> - @endif - </div> - </div> - </div> -</form> - -<div id="collapse{{$codestudy->id}}" class="collapse" style="margin-top: 8px;"> - <div class="card border-danger mb-3"> - <div class="card-body"> - <span class="text-danger">プログラムを削除します。<br>元に戻すことはできないため、よく確認して実行してください。</span> - - <div class="text-center"> - {{-- 削除ボタン --}} - <form action="{{url('/')}}/plugin/codestudies/deletecode/{{$page->id}}/{{$frame_id}}/{{$codestudy->id}}#frame-{{$frame->id}}" method="POST"> - {{csrf_field()}} - <button type="submit" class="btn btn-danger" onclick="javascript:return confirm('プログラムを削除します。\nよろしいですか?')"><i class="fas fa-check"></i> 本当に削除する</button> - </form> - </div> - </div> - </div> -</div> - -<div class="card border-info"> - <div class="card-header">保存済みプログラム</div> - <div class="card-body"> - <ol> - @foreach($codestudies as $codestudy) - @if($codestudy->title) - <li><a href="{{URL::to('/')}}/plugin/codestudies/editcode/{{$page->id}}/{{$frame_id}}/{{$codestudy->id}}#frame-{{$frame->id}}">{{$codestudy->title}}</a> [{{$codestudy->study_lang}}]</li> - @else - <li><a href="{{URL::to('/')}}/plugin/codestudies/editcode/{{$page->id}}/{{$frame_id}}/{{$codestudy->id}}#frame-{{$frame->id}}">無題</a> [{{$codestudy->study_lang}}]</li> - @endif - @endforeach - </ol> - </div> -</div> -@endsection
resources/views/plugins/user/codestudies/default/codestudies_forbidden.blade.php+0 −13 removed@@ -1,13 +0,0 @@ -{{-- - * コードスタディ画面テンプレート。 - * - * @author 永原 篤 <nagahara@opensource-workshop.jp> - * @copyright OpenSource-WorkShop Co.,Ltd. All Rights Reserved - * @category コードスタディプラグイン - --}} - -<div class="alert alert-danger" style="margin-top: 10px;"> - <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> - コードスタディを使用するには、ログインしてください。 -</div> -
resources/views/plugins/user/codestudies/default/download.blade.php+0 −27 removed@@ -1,27 +0,0 @@ -{{-- - * 成績ダウンロード指示画面 - * - * @author 永原 篤 <nagahara@opensource-workshop.jp> - * @copyright OpenSource-WorkShop Co.,Ltd. All Rights Reserved - * @category コードスタディプラグイン - --}} -@extends('core.cms_frame_base_setting') - -@section("core.cms_frame_edit_tab_$frame->id") - {{-- プラグイン側のフレームメニュー --}} - @include('plugins.user.codestudies.codestudies_frame_edit_tab') -@endsection - -@section("plugin_setting_$frame->id") - -{{-- ダウンロードフォーム --}} -<div class="text-center"> - <form action="{{url('/')}}/download/plugin/codestudies/download/{{$page->id}}/{{$frame_id}}#frame-{{$frame->id}}" method="GET" class="" name="form_download_{{$frame->id}}" id="form_download_{{$frame->id}}"> - {{ csrf_field() }} - <div class="form-group"> - <button type="submit" class="btn btn-primary"><i class="fas fa-check"></i> ダウンロード実行</button> - </div> - </form> -</div> - -@endsection
tests/bin/connect-cms-test.bat+1 −1 modified@@ -361,7 +361,7 @@ rem rem �y���̌����z �f����, �{�ݗ\�� rem �y���̐����z �^�u rem �y���̎��s�z �e�[�}�`�F���W���[ -rem �y���̋���z (DroneStudy), (CodeStudy) +rem �y���̋���z (DroneStudy) rem �yHTML���j���[�z �\���i�J�e�S���փ����N�APDF�փ����N�A�����փ����N�A������A���C�Z���X�i�\�t�g�E�F�A�A�}�j���A���j�j rem ---------------------------------------------
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
6- github.com/advisories/GHSA-hxqw-6qv7-cqfvghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-32276ghsaADVISORY
- github.com/opensource-workshop/connect-cms/commit/c0bcd07fc1e9375941aa1295d044328ecd44ed85ghsax_refsource_MISCWEB
- github.com/opensource-workshop/connect-cms/releases/tag/v1.41.1ghsax_refsource_MISCWEB
- github.com/opensource-workshop/connect-cms/releases/tag/v2.41.1ghsax_refsource_MISCWEB
- github.com/opensource-workshop/connect-cms/security/advisories/GHSA-hxqw-6qv7-cqfvghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.