Fixed bug in XMLRPC authenticator ('SHA256' typo instead of 'SHA-256' causing 401 because the authenticator can't understand the parameter), added Changelog

This commit is contained in:
Peio Rigaux 2020-10-16 15:55:33 +02:00
parent 7c04fd3789
commit 1922ff8eac
3 changed files with 24 additions and 2 deletions

22
CHANGELOG.md Normal file
View file

@ -0,0 +1,22 @@
# Change Log
All notable changes to this project will be documented in this file.
Group changes to describe their impact on the project, as follows:
| **Group name** | **Description** |
| ---------- | ----------------------------------------------------- |
| Added | New features |
| Changed | Changes in existing functionality |
| Deprecated | Once-stable features removed in upcoming releases |
| Removed | Deprecated features removed in this release |
| Fixed | Any bug fixes |
| Security | To invite users to upgrade in case of vulnerabilities |
As of now, since Flexisip-account-amanger doesn't have a release yet, changes will be listed by build number.
## Build 32 - 2020-10-16
### [Fixed]
- 401 Unauthorized when trying to use provisioning with SHA-256 digest auth ('SHA256' typo)

View file

@ -8,7 +8,7 @@
#%define _datadir %{_datarootdir}
#%define _docdir %{_datadir}/doc
%define build_number 31
%define build_number 32
%define var_dir /var/opt/belledonne-communications
%define opt_dir /opt/belledonne-communications/share/flexisip-account-manager
%define env_file "$RPM_BUILD_ROOT/etc/flexisip-account-manager/flexiapi.env"

View file

@ -91,7 +91,7 @@ function authenticate($auth_digest, $realm = "sip.example.org")
$A2 = md5(getenv('REQUEST_METHOD').':'.$data['uri']);
$valid_response = md5($A1.':'.$data['nonce'].':'.$data['nc'].':'.$data['cnonce'].':'.$data['qop'].':'.$A2);
break;
case 'SHA256':
case 'SHA-256':
$A1 = $password; // username:realm:password
$A2 = hash('sha256', getenv('REQUEST_METHOD').':'.$data['uri']);
$valid_response = hash('sha256', $A1.':'.$data['nonce'].':'.$data['nc'].':'.$data['cnonce'].':'.$data['qop'].':'.$A2);