Skip to content

Commit 634a445

Browse files
committed
fixed: correctly validate group invite code
1 parent a2b8ffa commit 634a445

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/functions.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Elgg\Database\Clauses\OrderByClause;
77
use Elgg\Database\Select;
88
use Elgg\Database\QueryBuilder;
9+
use Elgg\Security\Base64Url;
910

1011
/**
1112
* Check if a invitation code results in a group
@@ -17,7 +18,7 @@
1718
*/
1819
function group_tools_check_group_email_invitation($invite_code, $group_guid = 0) {
1920

20-
if (empty($invite_code)) {
21+
if (empty($invite_code) || !Base64Url::decode($invite_code)) {
2122
return false;
2223
}
2324

0 commit comments

Comments
 (0)