Invitations: an existing account gets a registration link, and unchecked input creates broken invitees
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 70/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- php
- Ambito
- authentication
Direzione di ricerca
Start with settingspage::invite() in system/datatypes/settings.php around line 112, then read the member list logic around line 676 and the related user and mail functions. Trace the supplied reproduction cases for existing accounts, comma-separated addresses, and empty input. Done means invalid or existing-account addresses are handled safely, users are added once, and pending invitees display correctly.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
settingspage::invite() (system/datatypes/settings.php:112) does not check what it gets:
- Address of an existing account.
hypha_addUser()refuses the address (user exists), but the result is ignored;hypha_getUserByEmail()then returns the existing account andhypha_addUserRegistrationKey()gives that account a registration key. The invitation mail goes to the owner of the account with asettings/register/<key>link, through which the user name, password, e-mail and language of that account can be set. Any member can do this for any account, including an administrator's. Together with #425 (invitation keys fromuniqid(), never expiring) this leaves a standing password-reset link on accounts that did not ask for one. - No validation of the input. The field is split on
,withouttrim()orfilter_var().[email protected], [email protected]stores the second address with a leading space;sendMail()then refuses it, but the invitee is kept. An empty field creates an invitee without an address. hypha_addUser()is called twice per address (lines 119 and 123); for an empty address the second call creates a second, empty user without key.- The member list shows invitation pending only for
rights == 'invite'(line 676), but invitees haverights="invitee", so an open invitation shows as a row with empty name columns.
Steps to reproduce. Log in as a member, settings → invite: (1) the administrator's address: the administrator account gets a key attribute and an invitation mail; (2) [email protected], [email protected]: the second invitee has email=" [email protected]"; (3) an empty field: two users without address are added.
Tested on PHP 8.2, 8.4 and 8.5 with a fictional test site (main, d97ab7b). Suggested direction: trim and validate each address, refuse addresses that already belong to an account (or only re-send for invitees), call hypha_addUser() once and compare with 'invitee' in the member list.
- Lingua principale
- JavaScript
- Stelle
- 5
- Fork
- 9
- Merge medio
- 18h 7m
- PR unite (30g)
- 11
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PlanBCode/hypha
-
Impact: Medium Level: Easy Type: Bug Value: Users
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Impact: Low Level: Easy Pagetype: Festival Type: Bug Value: Coders
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Impact: Medium Level: Easy Pagetype: Mailinglist Type: Bug Value: Users
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
Impact: Low Level: Easy Type: Bug Value: Coders
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
PlanBCode/hypha#586 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Impact: Medium Level: Easy Type: Bug Usecase: De Stadsbron Value: Visitors
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
PlanBCode/hypha#522 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di PlanBCode/hypha
Issue simili
-
bug documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
awslabs/visual-asset-management-system#880 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
[BUG]: Workspace settings forms stay at 50% width on narrow screens and wrap text word by wordApertapossible bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
Mintplex-Labs/anything-llm#6889 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
swc-project/swc-next#1165 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
nhsuk/nhsuk-prototype-kit-package#439 ·
I maintainer di solito rispondono entro 1 giorno