Compare commits

...

3 commits

Author SHA1 Message Date
Ilya Prokopenko
95a62f56e0
Auth: Add disabling the password reset page 2023-05-26 16:27:40 +07:00
Ilya Prokopenko
29716660c7
OpenVK Midnight: Change the example backdrop image 2023-05-26 16:27:04 +07:00
Ilya Prokopenko
8f23720c1f
Auth: Hide captcha when commitcaptcha is disabled 2023-05-26 16:26:19 +07:00
7 changed files with 39 additions and 28 deletions

View file

@ -207,6 +207,9 @@ final class AuthPresenter extends OpenVKPresenter
function renderFinishRestoringPassword(): void
{
if(OPENVK_ROOT_CONF['openvk']['preferences']['security']['disablePasswordRestoring'])
$this->notFound();
$request = $this->restores->getByToken(str_replace(" ", "+", $this->queryParam("key")));
if(!$request || !$request->isStillValid()) {
$this->flash("err", tr("token_manipulation_error"), tr("token_manipulation_error_comment"));
@ -241,6 +244,9 @@ final class AuthPresenter extends OpenVKPresenter
function renderRestore(): void
{
if(OPENVK_ROOT_CONF['openvk']['preferences']['security']['disablePasswordRestoring'])
$this->notFound();
if(!is_null($this->user))
$this->redirect($this->user->identity->getURL());

View file

@ -220,7 +220,7 @@
<input type="hidden" name="hash" value="{$csrfToken}" />
<input type="submit" value="{_log_in}" class="button" style="display: inline-block; font-family: Tahoma" />
<a href="/reg"><input type="button" value="{_registration}" class="button" style="font-family: Tahoma" /></a><br><br>
<a href="/restore">{_forgot_password}</a>
{if !OPENVK_ROOT_CONF['openvk']['preferences']['security']['disablePasswordRestoring']}<a href="/restore">{_forgot_password}</a>{/if}
</form>
{/ifset}
</div>

View file

@ -101,14 +101,16 @@
</select>
</td>
</tr>
<tr>
<td class="regform-left">
<span class="nobold">CAPTCHA: </span>
</td>
<td class="regform-right">
{captcha_template()|noescape}
</td>
</tr>
{if !(strpos(captcha_template(), 'verified'))}
<tr>
<td class="regform-left">
<span class="nobold">CAPTCHA: </span>
</td>
<td class="regform-right">
{captcha_template()|noescape}
</td>
</tr>
{/if}
</table>
<div style="margin-left: 100px; margin-right: 100px; text-align: center;">
<input type="hidden" name="hash" value="{$csrfToken}" />
@ -120,21 +122,18 @@
</form>
</div>
{else}
<h4>{_registration_closed}</h4>
<h4>{_registration_closed}</h4>
<table cellspacing="10" cellpadding="0" border="0" align="center" style="margin: 9px;">
<tbody>
<tr>
<td style="width: 20%;">
<img src="/assets/packages/static/openvk/img/oof.apng" alt="{_registration_closed}" style="width: 100%;"/>
<img src="/assets/packages/static/openvk/img/oof.apng" alt="{_registration_closed}" style="width: 100%;"/>
</td>
<td>
{_registration_disabled_info}
{if OPENVK_ROOT_CONF['openvk']['preferences']['registration']['disablingReason']}
<br/>
<br/>
{_admin_banned_link_reason}:
<br>
<b>{php echo OPENVK_ROOT_CONF['openvk']['preferences']['registration']['disablingReason']}</b>
<br/><br/>{_admin_banned_link_reason}:<br>
<b>{php echo OPENVK_ROOT_CONF['openvk']['preferences']['registration']['disablingReason']}</b>
{/if}
</td>
</tr>

View file

@ -28,6 +28,7 @@ openvk:
forcePhoneVerification: false
forceEmailVerification: false
forceStrongPassword: false
disablePasswordRestoring: true # turn this off if you have configured e-mail sending correctly
enableSu: true
rateLimits:
actions: 5

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -137,11 +137,11 @@ h4, .content_title_expanded, .summaryBar .summary, .content_title_unexpanded {
}
.content_title_expanded {
background-image: url("/themepack/midnight/0.0.2.5/resource/flex_arrow_open.png") !important;
background-image: url("/themepack/midnight/0.0.2.6/resource/flex_arrow_open.png") !important;
}
.content_title_unexpanded {
background-image: url("/themepack/midnight/0.0.2.5/resource/flex_arrow_shut.gif") !important;
background-image: url("/themepack/midnight/0.0.2.6/resource/flex_arrow_shut.gif") !important;
}
.ovk-video > .preview, .video-preview {
@ -163,17 +163,17 @@ h4, .content_title_expanded, .summaryBar .summary, .content_title_unexpanded {
.page_yellowheader {
color: #c6d2e8;
background-image: url("/themepack/midnight/0.0.2.5/resource/header_purple.png") !important;
background-image: url("/themepack/midnight/0.0.2.6/resource/header_purple.png") !important;
background-color: #231f34;
border-color: #231f34;
}
.page_header {
background-image: url("/themepack/midnight/0.0.2.5/resource/header.png") !important;
background-image: url("/themepack/midnight/0.0.2.6/resource/header.png") !important;
}
.page_custom_header {
background-image: url("/themepack/midnight/0.0.2.5/resource/header_custom.png") !important;
background-image: url("/themepack/midnight/0.0.2.6/resource/header_custom.png") !important;
}
.page_yellowheader span, .page_yellowheader a {
@ -193,11 +193,11 @@ form[action="/search"] > input, .header_search_input, textarea, input[type="text
}
input[type="checkbox"] {
background-image: url("/themepack/midnight/0.0.2.5/resource/checkbox.png") !important;
background-image: url("/themepack/midnight/0.0.2.6/resource/checkbox.png") !important;
}
input[type="radio"] {
background-image: url("/themepack/midnight/0.0.2.5/resource/radio.png") !important;
background-image: url("/themepack/midnight/0.0.2.6/resource/radio.png") !important;
}
.header_navigation .link {
@ -205,23 +205,28 @@ input[type="radio"] {
}
.heart {
background-image: url("/themepack/midnight/0.0.2.5/resource/like.gif") !important;
background-image: url("/themepack/midnight/0.0.2.6/resource/like.gif") !important;
}
.pinned-mark, .post-author .pin {
background-image: url("/themepack/midnight/0.0.2.5/resource/pin.png") !important;
background-image: url("/themepack/midnight/0.0.2.6/resource/pin.png") !important;
}
.repost-icon {
background-image: url("/themepack/midnight/0.0.2.5/resource/published.gif") !important;
background-image: url("/themepack/midnight/0.0.2.6/resource/published.gif") !important;
}
.post-author .delete {
background-image: url("/themepack/midnight/0.0.2.5/resource/input_clear.gif") !important;
background-image: url("/themepack/midnight/0.0.2.6/resource/input_clear.gif") !important;
}
.user-alert {
background-color: #41311a;
color: #d5b88c;
border-color: #514534;
}
#backdropEditor {
background-image: url("/themepack/midnight/0.0.2.6/resource/backdrop-editor.gif") !important;
border-color: #473e66 !important;
}

View file

@ -1,5 +1,5 @@
id: midnight
version: "0.0.2.5"
version: "0.0.2.6"
openvk_version: 0
enabled: 1
metadata: