Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2fa.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Author: dxw
Author URI: http://dxw.com
Network: true
Version: 2.0.1
Version: 2.0.2
*/

$registrar = require __DIR__.'/src/load.php';
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v2.0.2] - 2024-12-19

### Changed

- Clearer error messages

## [v2.0.1] - 2024-12-18

### Changed
Expand Down
10 changes: 8 additions & 2 deletions lib/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,14 @@ function twofa_add_device($user_id, $device_spec)
// Returns null on success, the error which occurred on failure
function twofa_send_sms($number, $body)
{
if (!defined('TWILIO_ACCOUNT_SID') || !defined('TWILIO_AUTH_TOKEN') || !defined('TWILIO_NUMBER')) {
return 'bad configuration';
if (!defined('TWILIO_ACCOUNT_SID')) {
return 'TWILIO_ACCOUNT_SID is not defined';
}
if (!defined('TWILIO_ACCOUNT_SID')) {
return 'TWILIO_AUTH_TOKEN is not defined';
}
if (!defined('TWILIO_NUMBER')) {
return 'TWILIO_NUMBER is not defined';
}

try {
Expand Down
Loading