From a62968d2d95ab2d934a2399fb9fd401310e96cb2 Mon Sep 17 00:00:00 2001 From: Brian Read Date: Tue, 28 Jan 2025 15:23:39 +0000 Subject: [PATCH] * Tue Jan 28 2025 Brian Read 11.0.0-47.sme - Temp (we hope) remove CSRF protection plugin [SME: ] - Fix comparison in footer with config->mode --- root/usr/share/smanager/lib/SrvMngr.pm | 12 ++++++------ .../default/templates/partials/_footer.html.ep | 2 +- smeserver-manager.spec | 8 ++++++-- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/root/usr/share/smanager/lib/SrvMngr.pm b/root/usr/share/smanager/lib/SrvMngr.pm index 31c57cd..42e1d3b 100644 --- a/root/usr/share/smanager/lib/SrvMngr.pm +++ b/root/usr/share/smanager/lib/SrvMngr.pm @@ -224,12 +224,12 @@ sub setup_plugins { # CSRF protection if production mode # $self->plugin('Mojolicious::Plugin::CSRFDefender' => { # Adapted plugin for use with GET method - $self->plugin('SrvMngr::Plugin::CSRFDefender' => { - onetime => 1, - error_status => 400, - error_content => 'Error: CSRF token is invalid or outdated' + #$self->plugin('SrvMngr::Plugin::CSRFDefender' => { + #onetime => 1, + #error_status => 400, + #error_content => 'Error: CSRF token is invalid or outdated' #error_template => 'csrf_400' - }) if ( $self->mode eq 'production' ); + #}) if ( $self->mode eq 'production' ); $self->plugin('SrvMngr::Plugin::I18N' => {namespace => 'SrvMngr::I18N', default => 'en'}); @@ -866,4 +866,4 @@ sub get_reg_mask { } -1; +1; \ No newline at end of file diff --git a/root/usr/share/smanager/themes/default/templates/partials/_footer.html.ep b/root/usr/share/smanager/themes/default/templates/partials/_footer.html.ep index fd7cdea..838c5e4 100644 --- a/root/usr/share/smanager/themes/default/templates/partials/_footer.html.ep +++ b/root/usr/share/smanager/themes/default/templates/partials/_footer.html.ep @@ -5,7 +5,7 @@ % if ( $c->is_logged_in ) { SME Server <%= session 'releaseVersion' %>-<%= $c->app->VERSION %> Manager II % my $mode; - % if (config->{mode} == 'development'){ $mode = '-dev';} else { $mode = '';} + % if (config->{mode} eq 'development'){ $mode = '-dev';} else { $mode = '';} (Mojo:<%= Mojolicious->VERSION %><%= $mode %>) % }
Copyright 1999-2006 Mitel Corporation
diff --git a/smeserver-manager.spec b/smeserver-manager.spec index 80997a4..320f93e 100644 --- a/smeserver-manager.spec +++ b/smeserver-manager.spec @@ -2,7 +2,7 @@ Summary: Sme server navigation module : manager 2 %define name smeserver-manager Name: %{name} %define version 11.0.0 -%define release 46 +%define release 47 Version: %{version} Release: %{release}%{?dist} License: GPL @@ -143,9 +143,13 @@ true %defattr(-,root,root) %changelog +* Tue Jan 28 2025 Brian Read 11.0.0-47.sme +- Temp (we hope) remove CSRF protection plugin [SME: ] +- Fix comparison in footer with config->mode + * Tue Jan 28 2025 Brian Read 11.0.0-46.sme - Adjust conditions for showing "Reconfigure required" to only check UnSavedChanges DB entry [SME: 12891] -- Add indication of developement mode in footer +- Add indication of development mode in footer * Sat Jan 25 2025 Brian Read 11.0.0-45.sme - Add some space in the reboot/reconf/shutdown panel [SME: ]