Don't allow plugins to modify login page

This commit is contained in:
djmaze 2020-11-25 14:38:16 +01:00
parent 4f8b07fe85
commit ebd32d8fad
5 changed files with 0 additions and 35 deletions

View file

@ -127,13 +127,6 @@
text-align: left;
}
.loginAfter {
display: inline-block;
height: 90%;
vertical-align: middle;
width: 0;
}
.flag-selector {
margin-bottom: 0;
}

View file

@ -2395,9 +2395,6 @@ class Actions
public function ProcessTemplate(string $sName, string $sHtml): string
{
$sHtml = $this->Plugins()->ProcessTemplate($sName, $sHtml);
$sHtml = \preg_replace('/\{\{INCLUDE\/([a-zA-Z]+)\/PLACE\}\}/', '', $sHtml);
$sHtml = \preg_replace('/<script/i', '<x-script', $sHtml);
$sHtml = \preg_replace('/<\/script>/i', '</x-script>', $sHtml);

View file

@ -560,25 +560,6 @@ class Manager
return $this;
}
public function ProcessTemplate(string $sName, string $sHtml) : string
{
if (isset($this->aProcessTemplate[$sName]))
{
foreach ($this->aProcessTemplate[$sName] as $sPlace => $aAddHtml)
{
if (\is_array($aAddHtml) && 0 < \count($aAddHtml))
{
foreach ($aAddHtml as $sAddHtml)
{
$sHtml = \str_replace('{{INCLUDE/'.$sPlace.'/PLACE}}', $sAddHtml.'{{INCLUDE/'.$sPlace.'/PLACE}}', $sHtml);
}
}
}
}
return $sHtml;
}
public function bIsEnabled() : bool
{
return $this->bIsEnabled;

View file

@ -42,6 +42,5 @@
</div>
</center>
</div>
<div class="loginAfter"></div>
<div>

View file

@ -16,7 +16,6 @@
</div>
<form class="wrapper submitting-pane loginForm thm-login thm-login-text" action="#/"
data-bind="submit: submitForm, css: {'errorAnimated': formError, 'welcome-off': welcome, 'submitting': submitRequest()}">
{{INCLUDE/TopControlGroup/PLACE}}
<div class="controls plugin-mark-Login-TopControlGroup"
data-bind="css: {'error': emailError, 'animated': emailErrorAnimation}">
<div class="input-append">
@ -69,7 +68,6 @@
}
}"></div>
</div>
{{INCLUDE/BottomControlGroup/PLACE}}
<div class="controls controls-submit-wrp" data-bind="hidden: hideSubmitButton">
<button type="submit" class="btn btn-large btn-block buttonLogin" data-bind="command: submitCommand">
<span class="i18n i18n-animation" data-i18n="LOGIN/BUTTON_SIGN_IN"></span>
@ -127,9 +125,6 @@
</a>
</span>
</div>
{{INCLUDE/BottomFooter/PLACE}}
</center>
</div>
<a href="#" onclick="return false;"></a>
<div class="loginAfter"></div>
</div>