Skip to content

Commit

Permalink
New release 5.9.0.3
Browse files Browse the repository at this point in the history
FIX: Issue with /run/php when a Docker container is restarted
FIX: {MultiOtpVersion} is now correctly replaced in scratchtemplate.html
ENH: {MultiOtpDisplayName} tag (AD/LDAP DisplayName) can be used in templates
FIX: User account containing octal encoded ISO characters are now also converted to UTF
  • Loading branch information
multiOTP committed May 25, 2022
1 parent 739ec0c commit 4015c78
Show file tree
Hide file tree
Showing 32 changed files with 731 additions and 3,404 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# Please check https://www\.multiOTP.net/ and you will find the magic button ;-)
#
# @author Andre Liechti, SysCo systemes de communication sa, <info@multiotp.net>
# @version 5.9.0.1
# @date 2022-05-19
# @version 5.9.0.3
# @date 2022-05-26
# @since 2013-11-29
# @copyright (c) 2013-2022 SysCo systemes de communication sa
# @copyright GNU Lesser General Public License
Expand Down Expand Up @@ -46,7 +46,7 @@ MAINTAINER Andre Liechti <andre.liechti@multiotp.net>
LABEL Description="multiOTP open source, running on Debian ${DEBIAN} with PHP${PHPVERSION}." \
License="LGPL-3.0" \
Usage="docker run -v [PATH/TO/MULTIOTP/DATA/VOLUME]:/etc/multiotp -v [PATH/TO/FREERADIUS/CONFIG/VOLUME]:/etc/freeradius -v [PATH/TO/MULTIOTP/LOG/VOLUME]:/var/log/multiotp -v [PATH/TO/FREERADIUS/LOG/VOLUME]:/var/log/freeradius -p [HOST WWW PORT NUMBER]:80 -p [HOST SSL PORT NUMBER]:443 -p [HOST RADIUS-AUTH PORT NUMBER]:1812/udp -p [HOST RADIUS-ACCNT PORT NUMBER]:1813/udp -d multiotp-open-source" \
Version="5.9.0.1"
Version="5.9.0.3"

ARG DEBIAN_FRONTEND=noninteractive

Expand Down
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ multiOTP open source is OATH certified for HOTP/TOTP
(c) 2010-2022 SysCo systemes de communication sa
https://www.multiotp.net/

Current build: 5.9.0.1 (2022-05-19)
Current build: 5.9.0.3 (2022-05-26)

Binary download: https://download.multiotp.net/ (including virtual appliance image)

Expand Down Expand Up @@ -168,11 +168,15 @@ WHAT'S NEW IN THIS 5.9.x RELEASE
================================
- New Raspberry, Hyper-V and OVA appliances available (version 011, based on Debian 11)
- Scratchlist can be generated from the Web GUI

- {MultiOtpDisplayName} (AD/LDAP DisplayName) can be used in templates

CHANGE LOG OF RELEASED VERSIONS
===============================
```
2022-05-26 5.9.0.3 FIX: Issue with /run/php when a Docker container is restarted
FIX: {MultiOtpVersion} is now correctly replaced in scratchtemplate.html
ENH: {MultiOtpDisplayName} tag (AD/LDAP DisplayName) can be used in templates
2022-05-20 5.9.0.2 FIX: User account containing octal encoded ISO characters are now also converted to UTF
2022-05-18 5.9.0.1 FIX: Set specific flags to run Perl scripts from FreeRADIUS
2022-05-18 5.9.0.0 FIX: User account containing special ISO characters are now also converted to UTF
ENH: New Hyper-V and OVA appliances available (version 011, based on Debian 11)
Expand Down Expand Up @@ -1570,7 +1574,7 @@ MULTIOTP COMMAND LINE TOOL
==========================

```
multiOTP 5.9.0.1 (2022-05-19)
multiOTP 5.9.0.3 (2022-05-26)
(c) 2010-2022 SysCo systemes de communication sa
http://www.multiOTP.net (you can try the [Donate] button ;-)
Expand Down Expand Up @@ -2079,8 +2083,8 @@ Visit https://forum.multiotp.net/ for additional support
```

```
Hash verification for multiotp_5.9.0.1.zip
SHA256:d1068aa5e26bd89be7dc9dcf0faf7f469131084071facdd66be527a98c6de185
SHA1:161741561b46a06b56112cc50322d49b9ec8bbbd
MD5:919acc0efe1ba5b65659b258966f7361
Hash verification for multiotp_5.9.0.3.zip
SHA256:b85ada800247a7c3aa21c5539fff6cc282cc97ed1f6af7ab4f36577883968827
SHA1:ee7d8ddbb2a5e7b58173ce30595214b2390411b6
MD5:3240046388f4b8328a80c32636a2df7c
```
4 changes: 2 additions & 2 deletions check.multiotp.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* PHP 5.3.0 or higher is supported.
*
* @author Andre Liechti, SysCo systemes de communication sa, <info@multiotp.net>
* @version 5.9.0.1
* @date 2022-05-19
* @version 5.9.0.3
* @date 2022-05-26
* @since 2013-07-10
* @copyright (c) 2013-2022 SysCo systemes de communication sa
* @copyright GNU Lesser General Public License
Expand Down
55 changes: 49 additions & 6 deletions checkmultiotp.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ REM
REM Windows batch file for Windows 2K/XP/2003/7/2008/8/2012/10/2019
REM
REM @author Andre Liechti, SysCo systemes de communication sa, <info@multiotp.net>
REM @version 5.9.0.1
REM @date 2022-05-19
REM @version 5.9.0.3
REM @date 2022-05-26
REM @since 2010-07-10
REM @copyright (c) 2010-2022 SysCo systemes de communication sa
REM @copyright GNU Lesser General Public License
Expand Down Expand Up @@ -112,6 +112,9 @@ IF NOT %ERRORLEVEL% == 0 (
)
:NoWarning

REM UTF-8 mode
CHCP 65001

IF EXIST "%TEMP%\multiotp_error.log" DEL "%TEMP%\multiotp_error.log" /Q

REM No web display of the webservice installation
Expand Down Expand Up @@ -202,6 +205,40 @@ IF "mysql"=="%_backend%" %_multiotp% -display-log -initialize-backend
IF "pgsql"=="%_backend%" %_multiotp% -display-log -initialize-backend


REM Delete the test_stéphane (if existing)
%_multiotp% -log -delete test_stéphane
IF NOT ERRORLEVEL 13 ECHO.
IF NOT ERRORLEVEL 13 ECHO - User test_stéphane successfully deleted

ECHO.
ECHO Create user test_stéphane with the RFC test values HOTP token and a big alpha PIN
%_multiotp% -log -create -prefix-pin test_stéphane HOTP 3132333435363738393031323334353637383930 "ThisIsALongNonDigitPinCode!" 6 0
IF NOT ERRORLEVEL 12 ECHO - OK! User test_stéphane successfully created
IF NOT ERRORLEVEL 12 SET /A SUCCESSES=SUCCESSES+1
IF ERRORLEVEL 12 ECHO - KO! Error creating the user test_stéphane
IF ERRORLEVEL 12 ECHO - KO! Error creating the user test_stéphane (%_backend%) >>"%TEMP%\multiotp_error.log"
SET /A TOTAL_TESTS=TOTAL_TESTS+1

ECHO.
ECHO Authenticate test_stéphane with the first token of the RFC test values, no prefix
%_multiotp% -keep-local -log test_st\351phane 755224
IF NOT ERRORLEVEL 1 ECHO - KO! Token of the user test_stéphane successfully accepted without prefix
IF NOT ERRORLEVEL 1 ECHO - KO! Token of the user test_stéphane successfully accepted without prefix (%_backend%) >>"%TEMP%\multiotp_error.log"
IF NOT ERRORLEVEL 1 GOTO ErrorNoPrefix
IF ERRORLEVEL 1 ECHO - OK! Token of the user test_stéphane successfully REJECTED (no prefix)
IF ERRORLEVEL 1 SET /A SUCCESSES=SUCCESSES+1
:ErrorNoPrefix
SET /A TOTAL_TESTS=TOTAL_TESTS+1

ECHO.
ECHO Authenticate test_stéphane with the first token of the RFC test values, with prefix
%_multiotp% -keep-local -log test_st\351phane "ThisIsALongNonDigitPinCode!755224"
IF NOT ERRORLEVEL 1 ECHO - OK! Token of the user test_stéphane successfully accepted
IF NOT ERRORLEVEL 1 SET /A SUCCESSES=SUCCESSES+1
IF ERRORLEVEL 1 ECHO - KO! Error authenticating the user test_stéphane with the first token
IF ERRORLEVEL 1 ECHO - KO! Error authenticating the user test_stéphane with the first token (%_backend%) >>"%TEMP%\multiotp_error.log"
SET /A TOTAL_TESTS=TOTAL_TESTS+1

REM Delete the test_user (if existing)
%_multiotp% -log -delete test_user
IF NOT ERRORLEVEL 13 ECHO.
Expand Down Expand Up @@ -543,6 +580,8 @@ IF ERRORLEVEL 1 SET /A SUCCESSES=SUCCESSES+1
:ErrorBadValue2FA
SET /A TOTAL_TESTS=TOTAL_TESTS+1

REM GOTO DelTestUserSkip

ECHO.
ECHO And now, delete old users...
REM Delete the test_user2 (if existing)
Expand All @@ -551,8 +590,6 @@ ECHO - test_user2
IF NOT ERRORLEVEL 13 ECHO.
IF NOT ERRORLEVEL 13 ECHO - User test_user2 successfully deleted

REM GOTO DelTestUserSkip

REM Delete the test_user
ECHO - test_user
%_multiotp% -log -delete test_user
Expand All @@ -571,6 +608,14 @@ ECHO - test_user_no_2fa
IF NOT ERRORLEVEL 13 ECHO.
IF NOT ERRORLEVEL 13 ECHO - User test_user2 successfully deleted

REM Delete the test_stéphane
ECHO - test_stéphane
%_multiotp% -log -delete test_stéphane
IF NOT ERRORLEVEL 13 ECHO.
IF NOT ERRORLEVEL 13 ECHO - User test_stéphane successfully deleted

:DelTestUserSkip

REM Show Log
REM %_multiotp% -showlog

Expand Down Expand Up @@ -623,8 +668,6 @@ ECHO End of the CLI multiOTP tests
IF %SUCCESSES% EQU %TOTAL_TESTS% ECHO (everything is OK so far...)
ECHO.

:DelTestUserSkip


ECHO.
ECHO Check the PHP multiOTP class using the %_multiotp_class_check% file.
Expand Down
32 changes: 26 additions & 6 deletions contrib/MultiotpTools.php
Original file line number Diff line number Diff line change
Expand Up @@ -618,17 +618,37 @@ function base32_decode($input)


/*******************************************************************
* Custom function encode_utf8_if_needed
* Custom function encode_utf8_if_needed (now also décoding octal notation)
*
* @author SysCo/al
*******************************************************************/
/***********************************************************************
* Name: encode_utf8_if_needed
* Short description: encode to UTF-8 if needed, and also converting ISO octal notation
*
* Creation 2022-05-20
* Update 2021-03-14
* @version 1.1.0
* @author SysCo/al
*
* @param string $data string to encode if needed
* @return string UTF-8 string
***********************************************************************/
if (!function_exists('encode_utf8_if_needed')) {
function encode_utf8_if_needed($data)
{
function encode_utf8_if_needed(
$data
) {
$text = $data;
$encoding = mb_detect_encoding($text . 'a' , 'UTF-8, ISO-8859-1');
if ("UTF-8" != $encoding) {
$text = utf8_encode($text);

preg_match_all('#\\\\[0-9]{3}#', $text, $matches);
foreach($matches[0] as $match){
$char = preg_replace("#(\\\)#", "", $match);
$a = pack("H*", base_convert($char, 8, 16));
$text = preg_replace('#(\\\\)'.$char.'#',$a,$text);
}
$encoding = mb_detect_encoding($text . 'a' , 'UTF-8, ISO-8859-1');
if ("UTF-8" != $encoding) {
$text = utf8_encode($text);
// $encoding = mb_detect_encoding($text . 'a' , 'UTF-8, ISO-8859-1, WINDOWS-1252');
// if ("UTF-8" != $encoding) {
// $text = mb_convert_encoding($text, "UTF-8", "UTF-8, ISO-8859-1, WINDOWS-1252");
Expand Down
4 changes: 2 additions & 2 deletions launcher/ReadMe.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ The multiOTP C++ launcher is simply used to launch PHP
and run multiotp.windows.php with the provided arguments.

@author Andre Liechti, SysCo systemes de communication sa, <info@multiotp.net>
@version 5.9.0.1
@date 2022-05-19
@version 5.9.0.3
@date 2022-05-26
@since 2016-12-08
@copyright (c) 2010-2022 SysCo systemes de communication sa
@copyright GNU Lesser General Public License
Expand Down
8 changes: 4 additions & 4 deletions launcher/launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* and run multiotp.windows.php with the provided arguments.
*
* @author Andre Liechti, SysCo systemes de communication sa, <info@multiotp.net>
* @version 5.9.0.1
* @date 2022-05-19
* @version 5.9.0.3
* @date 2022-05-26
* @since 2016-12-08
* @copyright (c) 2010-2022 SysCo systemes de communication sa
* @copyright GNU Lesser General Public License
Expand Down Expand Up @@ -68,8 +68,8 @@
#include <iostream>

#define SOFTWARE "LAUNCHPHPMULTIOTP"
#define VER_NUMBER "5.9.0.1"
#define VER_DATE "2022-05-19"
#define VER_NUMBER "5.9.0.3"
#define VER_DATE "2022-05-26"

int _tmain(int argc, _TCHAR* argv[])
{
Expand Down
Loading

0 comments on commit 4015c78

Please sign in to comment.