Files
chocomae/src/web/server/maestro/player_login_with_maestro.php
T
2026-10-22 22:57:52 +09:00

35 lines
742 B
PHP

<!DOCTYPE html>
<html>
<head>
<script>
<?php
$maestro_name = isset($_GET["maestro_name"]) ? (string)$_GET["maestro_name"] : "";
// echo "maestro_name : $maestro_name</br>";
if($maestro_name == "") {
echo "// no maestro_name\n";
run_url("./../../player/login.html");
exit;
}
// 사용자 입력이 스크립트로 실행되지 않도록 JS 문자열 리터럴로 안전하게 출력 (XSS 방지)
$maestro_name_js = json_encode($maestro_name, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP);
echo("sessionStorage.setItem('maestroName', $maestro_name_js);\n\r");
run_url("./../../client/login.html");
function run_url($targetUrl) {
echo("location.replace('$targetUrl');");
}
?>
</script>
</head>
<body>
</body>
</html>