{"action":"created","comment":{"url":"https://api.github.com/repos/yakamara/ydeploy/pulls/comments/175687341","pull_request_review_id":105255447,"id":175687341,"diff_hunk":"@@ -29,3 +29,132 @@\n $fragment->setVar('title', 'Info');\n $fragment->setVar('body', $content, false);\n echo $fragment->parse('core/page/section.php');\n+\n+if (!$ydeploy->isDeployed()) {\n+    return;\n+}\n+\n+$apiUrl = function (array $params, string $page, string $redirect = null) {\n+    $params['protected_page'] = $page;\n+\n+    if ($redirect) {\n+        $params['redirect'] = $redirect;\n+    }\n+\n+    return rex_url::currentBackendPage($params);\n+};\n+\n+$calledPage = rex_request('page', 'string');\n+\n+if ('system/ydeploy' !== $calledPage) {\n+    $redirect = rex_context::fromGet()->getUrl([], false);\n+    $url = $apiUrl(rex_api_ydeploy_unlock_page::getUrlParams(), $calledPage, $redirect);\n+\n+    echo rex_view::error('\n+        The called page <code>'.$calledPage.'</code> is protected in deployed instances because it should be used only in development instances. <br><br>","path":"pages/system.ydeploy.php","position":26,"original_position":26,"commit_id":"d2a15312bab0af9ef7d456563147a79d6341e4c6","original_commit_id":"d2a15312bab0af9ef7d456563147a79d6341e4c6","user":{"login":"staabm","id":120441,"avatar_url":"https://avatars2.githubusercontent.com/u/120441?v=4","gravatar_id":"","url":"https://api.github.com/users/staabm","html_url":"https://github.com/staabm","followers_url":"https://api.github.com/users/staabm/followers","following_url":"https://api.github.com/users/staabm/following{/other_user}","gists_url":"https://api.github.com/users/staabm/gists{/gist_id}","starred_url":"https://api.github.com/users/staabm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staabm/subscriptions","organizations_url":"https://api.github.com/users/staabm/orgs","repos_url":"https://api.github.com/users/staabm/repos","events_url":"https://api.github.com/users/staabm/events{/privacy}","received_events_url":"https://api.github.com/users/staabm/received_events","type":"User","site_admin":false},"body":"xss möglich","created_at":"2018-03-20T08:44:09Z","updated_at":"2018-03-20T08:44:09Z","html_url":"https://github.com/yakamara/ydeploy/pull/23#discussion_r175687341","pull_request_url":"https://api.github.com/repos/yakamara/ydeploy/pulls/23","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/yakamara/ydeploy/pulls/comments/175687341"},"html":{"href":"https://github.com/yakamara/ydeploy/pull/23#discussion_r175687341"},"pull_request":{"href":"https://api.github.com/repos/yakamara/ydeploy/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/yakamara/ydeploy/pulls/23","id":175712777,"html_url":"https://github.com/yakamara/ydeploy/pull/23","diff_url":"https://github.com/yakamara/ydeploy/pull/23.diff","patch_url":"https://github.com/yakamara/ydeploy/pull/23.patch","issue_url":"https://api.github.com/repos/yakamara/ydeploy/issues/23","number":23,"state":"open","locked":false,"title":"Wenn deployed, dann manche Pages schützen","user":{"login":"gharlan","id":330436,"avatar_url":"https://avatars0.githubusercontent.com/u/330436?v=4","gravatar_id":"","url":"https://api.github.com/users/gharlan","html_url":"https://github.com/gharlan","followers_url":"https://api.github.com/users/gharlan/followers","following_url":"https://api.github.com/users/gharlan/following{/other_user}","gists_url":"https://api.github.com/users/gharlan/gists{/gist_id}","starred_url":"https://api.github.com/users/gharlan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gharlan/subscriptions","organizations_url":"https://api.github.com/users/gharlan/orgs","repos_url":"https://api.github.com/users/gharlan/repos","events_url":"https://api.github.com/users/gharlan/events{/privacy}","received_events_url":"https://api.github.com/users/gharlan/received_events","type":"User","site_admin":false},"body":"Falls man eine solche Page doch direkt aufruft, bekommt man dies:\r\n\r\n![screenshot 2018-03-17 18 56 11](https://user-images.githubusercontent.com/330436/37558460-e5011eb4-2a14-11e8-872c-ad93212c6ca7.png)\r\n","created_at":"2018-03-17T17:56:55Z","updated_at":"2018-03-20T08:44:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"43c3c06f8a9bbda8a3f4177b3a9c42b0971f3f2d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/yakamara/ydeploy/pulls/23/commits","review_comments_url":"https://api.github.com/repos/yakamara/ydeploy/pulls/23/comments","review_comment_url":"https://api.github.com/repos/yakamara/ydeploy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yakamara/ydeploy/issues/23/comments","statuses_url":"https://api.github.com/repos/yakamara/ydeploy/statuses/d2a15312bab0af9ef7d456563147a79d6341e4c6","head":{"label":"yakamara:protected-pages","ref":"protected-pages","sha":"d2a15312bab0af9ef7d456563147a79d6341e4c6","user":{"login":"yakamara","id":822357,"avatar_url":"https://avatars2.githubusercontent.com/u/822357?v=4","gravatar_id":"","url":"https://api.github.com/users/yakamara","html_url":"https://github.com/yakamara","followers_url":"https://api.github.com/users/yakamara/followers","following_url":"https://api.github.com/users/yakamara/following{/other_user}","gists_url":"https://api.github.com/users/yakamara/gists{/gist_id}","starred_url":"https://api.github.com/users/yakamara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yakamara/subscriptions","organizations_url":"https://api.github.com/users/yakamara/orgs","repos_url":"https://api.github.com/users/yakamara/repos","events_url":"https://api.github.com/users/yakamara/events{/privacy}","received_events_url":"https://api.github.com/users/yakamara/received_events","type":"Organization","site_admin":false},"repo":{"id":84062523,"name":"ydeploy","full_name":"yakamara/ydeploy","owner":{"login":"yakamara","id":822357,"avatar_url":"https://avatars2.githubusercontent.com/u/822357?v=4","gravatar_id":"","url":"https://api.github.com/users/yakamara","html_url":"https://github.com/yakamara","followers_url":"https://api.github.com/users/yakamara/followers","following_url":"https://api.github.com/users/yakamara/following{/other_user}","gists_url":"https://api.github.com/users/yakamara/gists{/gist_id}","starred_url":"https://api.github.com/users/yakamara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yakamara/subscriptions","organizations_url":"https://api.github.com/users/yakamara/orgs","repos_url":"https://api.github.com/users/yakamara/repos","events_url":"https://api.github.com/users/yakamara/events{/privacy}","received_events_url":"https://api.github.com/users/yakamara/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yakamara/ydeploy","description":"Deployment von REDAXO-Projekten","fork":false,"url":"https://api.github.com/repos/yakamara/ydeploy","forks_url":"https://api.github.com/repos/yakamara/ydeploy/forks","keys_url":"https://api.github.com/repos/yakamara/ydeploy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yakamara/ydeploy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yakamara/ydeploy/teams","hooks_url":"https://api.github.com/repos/yakamara/ydeploy/hooks","issue_events_url":"https://api.github.com/repos/yakamara/ydeploy/issues/events{/number}","events_url":"https://api.github.com/repos/yakamara/ydeploy/events","assignees_url":"https://api.github.com/repos/yakamara/ydeploy/assignees{/user}","branches_url":"https://api.github.com/repos/yakamara/ydeploy/branches{/branch}","tags_url":"https://api.github.com/repos/yakamara/ydeploy/tags","blobs_url":"https://api.github.com/repos/yakamara/ydeploy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yakamara/ydeploy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yakamara/ydeploy/git/refs{/sha}","trees_url":"https://api.github.com/repos/yakamara/ydeploy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yakamara/ydeploy/statuses/{sha}","languages_url":"https://api.github.com/repos/yakamara/ydeploy/languages","stargazers_url":"https://api.github.com/repos/yakamara/ydeploy/stargazers","contributors_url":"https://api.github.com/repos/yakamara/ydeploy/contributors","subscribers_url":"https://api.github.com/repos/yakamara/ydeploy/subscribers","subscription_url":"https://api.github.com/repos/yakamara/ydeploy/subscription","commits_url":"https://api.github.com/repos/yakamara/ydeploy/commits{/sha}","git_commits_url":"https://api.github.com/repos/yakamara/ydeploy/git/commits{/sha}","comments_url":"https://api.github.com/repos/yakamara/ydeploy/comments{/number}","issue_comment_url":"https://api.github.com/repos/yakamara/ydeploy/issues/comments{/number}","contents_url":"https://api.github.com/repos/yakamara/ydeploy/contents/{+path}","compare_url":"https://api.github.com/repos/yakamara/ydeploy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yakamara/ydeploy/merges","archive_url":"https://api.github.com/repos/yakamara/ydeploy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yakamara/ydeploy/downloads","issues_url":"https://api.github.com/repos/yakamara/ydeploy/issues{/number}","pulls_url":"https://api.github.com/repos/yakamara/ydeploy/pulls{/number}","milestones_url":"https://api.github.com/repos/yakamara/ydeploy/milestones{/number}","notifications_url":"https://api.github.com/repos/yakamara/ydeploy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yakamara/ydeploy/labels{/name}","releases_url":"https://api.github.com/repos/yakamara/ydeploy/releases{/id}","deployments_url":"https://api.github.com/repos/yakamara/ydeploy/deployments","created_at":"2017-03-06T10:53:52Z","updated_at":"2018-03-19T17:14:25Z","pushed_at":"2018-03-20T00:51:57Z","git_url":"git://github.com/yakamara/ydeploy.git","ssh_url":"git@github.com:yakamara/ydeploy.git","clone_url":"https://github.com/yakamara/ydeploy.git","svn_url":"https://github.com/yakamara/ydeploy","homepage":"","size":49,"stargazers_count":9,"watchers_count":9,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":8,"license":null,"forks":2,"open_issues":8,"watchers":9,"default_branch":"master"}},"base":{"label":"yakamara:master","ref":"master","sha":"711d4c3d4628fa191ad84ae22ff79872ffcd435d","user":{"login":"yakamara","id":822357,"avatar_url":"https://avatars2.githubusercontent.com/u/822357?v=4","gravatar_id":"","url":"https://api.github.com/users/yakamara","html_url":"https://github.com/yakamara","followers_url":"https://api.github.com/users/yakamara/followers","following_url":"https://api.github.com/users/yakamara/following{/other_user}","gists_url":"https://api.github.com/users/yakamara/gists{/gist_id}","starred_url":"https://api.github.com/users/yakamara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yakamara/subscriptions","organizations_url":"https://api.github.com/users/yakamara/orgs","repos_url":"https://api.github.com/users/yakamara/repos","events_url":"https://api.github.com/users/yakamara/events{/privacy}","received_events_url":"https://api.github.com/users/yakamara/received_events","type":"Organization","site_admin":false},"repo":{"id":84062523,"name":"ydeploy","full_name":"yakamara/ydeploy","owner":{"login":"yakamara","id":822357,"avatar_url":"https://avatars2.githubusercontent.com/u/822357?v=4","gravatar_id":"","url":"https://api.github.com/users/yakamara","html_url":"https://github.com/yakamara","followers_url":"https://api.github.com/users/yakamara/followers","following_url":"https://api.github.com/users/yakamara/following{/other_user}","gists_url":"https://api.github.com/users/yakamara/gists{/gist_id}","starred_url":"https://api.github.com/users/yakamara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yakamara/subscriptions","organizations_url":"https://api.github.com/users/yakamara/orgs","repos_url":"https://api.github.com/users/yakamara/repos","events_url":"https://api.github.com/users/yakamara/events{/privacy}","received_events_url":"https://api.github.com/users/yakamara/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yakamara/ydeploy","description":"Deployment von REDAXO-Projekten","fork":false,"url":"https://api.github.com/repos/yakamara/ydeploy","forks_url":"https://api.github.com/repos/yakamara/ydeploy/forks","keys_url":"https://api.github.com/repos/yakamara/ydeploy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yakamara/ydeploy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yakamara/ydeploy/teams","hooks_url":"https://api.github.com/repos/yakamara/ydeploy/hooks","issue_events_url":"https://api.github.com/repos/yakamara/ydeploy/issues/events{/number}","events_url":"https://api.github.com/repos/yakamara/ydeploy/events","assignees_url":"https://api.github.com/repos/yakamara/ydeploy/assignees{/user}","branches_url":"https://api.github.com/repos/yakamara/ydeploy/branches{/branch}","tags_url":"https://api.github.com/repos/yakamara/ydeploy/tags","blobs_url":"https://api.github.com/repos/yakamara/ydeploy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yakamara/ydeploy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yakamara/ydeploy/git/refs{/sha}","trees_url":"https://api.github.com/repos/yakamara/ydeploy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yakamara/ydeploy/statuses/{sha}","languages_url":"https://api.github.com/repos/yakamara/ydeploy/languages","stargazers_url":"https://api.github.com/repos/yakamara/ydeploy/stargazers","contributors_url":"https://api.github.com/repos/yakamara/ydeploy/contributors","subscribers_url":"https://api.github.com/repos/yakamara/ydeploy/subscribers","subscription_url":"https://api.github.com/repos/yakamara/ydeploy/subscription","commits_url":"https://api.github.com/repos/yakamara/ydeploy/commits{/sha}","git_commits_url":"https://api.github.com/repos/yakamara/ydeploy/git/commits{/sha}","comments_url":"https://api.github.com/repos/yakamara/ydeploy/comments{/number}","issue_comment_url":"https://api.github.com/repos/yakamara/ydeploy/issues/comments{/number}","contents_url":"https://api.github.com/repos/yakamara/ydeploy/contents/{+path}","compare_url":"https://api.github.com/repos/yakamara/ydeploy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yakamara/ydeploy/merges","archive_url":"https://api.github.com/repos/yakamara/ydeploy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yakamara/ydeploy/downloads","issues_url":"https://api.github.com/repos/yakamara/ydeploy/issues{/number}","pulls_url":"https://api.github.com/repos/yakamara/ydeploy/pulls{/number}","milestones_url":"https://api.github.com/repos/yakamara/ydeploy/milestones{/number}","notifications_url":"https://api.github.com/repos/yakamara/ydeploy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yakamara/ydeploy/labels{/name}","releases_url":"https://api.github.com/repos/yakamara/ydeploy/releases{/id}","deployments_url":"https://api.github.com/repos/yakamara/ydeploy/deployments","created_at":"2017-03-06T10:53:52Z","updated_at":"2018-03-19T17:14:25Z","pushed_at":"2018-03-20T00:51:57Z","git_url":"git://github.com/yakamara/ydeploy.git","ssh_url":"git@github.com:yakamara/ydeploy.git","clone_url":"https://github.com/yakamara/ydeploy.git","svn_url":"https://github.com/yakamara/ydeploy","homepage":"","size":49,"stargazers_count":9,"watchers_count":9,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":8,"license":null,"forks":2,"open_issues":8,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yakamara/ydeploy/pulls/23"},"html":{"href":"https://github.com/yakamara/ydeploy/pull/23"},"issue":{"href":"https://api.github.com/repos/yakamara/ydeploy/issues/23"},"comments":{"href":"https://api.github.com/repos/yakamara/ydeploy/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/yakamara/ydeploy/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/yakamara/ydeploy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yakamara/ydeploy/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/yakamara/ydeploy/statuses/d2a15312bab0af9ef7d456563147a79d6341e4c6"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"staabm"}}