Skip to content

Commit

Permalink
fixed: correctly validate group invite code
Browse files Browse the repository at this point in the history
  • Loading branch information
jeabakker committed Aug 27, 2020
1 parent a2b8ffa commit 634a445
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Elgg\Database\Clauses\OrderByClause;
use Elgg\Database\Select;
use Elgg\Database\QueryBuilder;
use Elgg\Security\Base64Url;

/**
* Check if a invitation code results in a group
Expand All @@ -17,7 +18,7 @@
*/
function group_tools_check_group_email_invitation($invite_code, $group_guid = 0) {

if (empty($invite_code)) {
if (empty($invite_code) || !Base64Url::decode($invite_code)) {
return false;
}

Expand Down

0 comments on commit 634a445

Please sign in to comment.