From 85c7703e267217e2695fd639cc75b95151abe6a6 Mon Sep 17 00:00:00 2001 From: mrilyew <99399973+mrilyew@users.noreply.github.com> Date: Sun, 17 Nov 2024 16:27:24 +0300 Subject: [PATCH] cloudflare bypass (do not uncomment) --- Web/Presenters/OpenVKPresenter.php | 5 +++++ Web/Presenters/templates/Wall/Feed.xml | 4 ---- Web/Presenters/templates/Wall/Wall.xml | 4 ---- Web/Presenters/templates/components/wall.xml | 4 ---- Web/static/js/al_wall.js | 3 ++- 5 files changed, 7 insertions(+), 13 deletions(-) diff --git a/Web/Presenters/OpenVKPresenter.php b/Web/Presenters/OpenVKPresenter.php index a5a76011..60858bcc 100644 --- a/Web/Presenters/OpenVKPresenter.php +++ b/Web/Presenters/OpenVKPresenter.php @@ -283,6 +283,11 @@ abstract class OpenVKPresenter extends SimplePresenter } } + /*if($this->queryParam('al') == '1') { + $this->assertNoCSRF(); + header('Content-Type: text/plain; charset=UTF-8'); + }*/ + parent::onStartup(); } diff --git a/Web/Presenters/templates/Wall/Feed.xml b/Web/Presenters/templates/Wall/Feed.xml index 33a70533..94658a81 100644 --- a/Web/Presenters/templates/Wall/Feed.xml +++ b/Web/Presenters/templates/Wall/Feed.xml @@ -57,8 +57,4 @@ window.location.assign(url.replace("__padding", e.target.value)); }); - - {if isset($thisUser) && $thisUser->hasMicroblogEnabled()} - {script "js/al_comments.js"} - {/if} {/block} diff --git a/Web/Presenters/templates/Wall/Wall.xml b/Web/Presenters/templates/Wall/Wall.xml index 73801632..4d3d1cee 100644 --- a/Web/Presenters/templates/Wall/Wall.xml +++ b/Web/Presenters/templates/Wall/Wall.xml @@ -45,8 +45,4 @@ - - {if isset($thisUser) && $thisUser->hasMicroblogEnabled()} - {script "js/al_comments.js"} - {/if} {/block} diff --git a/Web/Presenters/templates/components/wall.xml b/Web/Presenters/templates/components/wall.xml index 8479041d..b00681a1 100644 --- a/Web/Presenters/templates/components/wall.xml +++ b/Web/Presenters/templates/components/wall.xml @@ -28,7 +28,3 @@ - -{if isset($thisUser) && $thisUser->hasMicroblogEnabled()} - {script "js/al_comments.js"} -{/if} diff --git a/Web/static/js/al_wall.js b/Web/static/js/al_wall.js index 53617dd4..320ab9e4 100644 --- a/Web/static/js/al_wall.js +++ b/Web/static/js/al_wall.js @@ -2013,6 +2013,8 @@ async function __processPaginatorNextPage(page) const replace_url = new URL(location.href) replace_url.searchParams.set('p', page) + /*replace_url.searchParams.set('al', 1) + replace_url.searchParams.set('hash', u("meta[name=csrf]").attr("value"))*/ const new_content = await fetch(replace_url.href) const new_content_response = await new_content.text() @@ -2024,7 +2026,6 @@ async function __processPaginatorNextPage(page) }) u(`.paginator:not(.paginator-at-top)`).html(parsed_content.querySelector('.paginator:not(.paginator-at-top)').innerHTML) - // fffffuck if(u(`.paginator:not(.paginator-at-top)`).nodes[0].closest('.scroll_container')) { container.nodes[0].append(u(`.paginator:not(.paginator-at-top)`).nodes[0].parentNode) }