[Feature: Forum] Improve Live Chat Anonymous Naming#12547
[Feature: Forum] Improve Live Chat Anonymous Naming#12547QuackHonk wants to merge 4 commits intoSubmitty:mainfrom
Conversation
John-Roy123
left a comment
There was a problem hiding this comment.
After submitty_install-ing instead of submitty_install_site, the changes work as intended. That is my bad!
When I reduce the number of nouns and adjectives to 1 each and join as a student and an instructor and then later as another student and the names had incremental numbers next to them to indicate each user.
|
Hi @QuackHonk I have also been working on this same issue (mine PR #12459 ) , so I tried testing your code locally. One thing I was confused on was - From my test, regenerate seems to clear cached name/session, but the resulting name can still remain unchanged for a user.
|


Why is this Change Important & Necessary?
Fixes #11999
What is the New Behavior?
Instead of the previous method of inputing user information into crc32 and using that number result to directly choose the base adjective and base name, we instead generate a unique salt for each user using hmac_sha256. We then use both the number result and our original user information to pick out an anonymous username. Various information including th user, their salt, and their username will be stored in the new table classroom_participants. To fix the issue where two people are assigned the same base name,
Before.


One noun and one adjective
After:
one noun and one adjective


Even though both people are given the same base name, they can be differetiated by their numbers.
What steps should a reviewer take to reproduce or test the bug or new feature?
Our change to HMAC and utilizing salts can be seen in submitty_s26_sample.public.chatroom_participants. Every salt should be unique to each person. Each name should be unique to each person (ibase names can have multiples if we run out of unused base names)
To test all names being filled and adding a new anonymous participant without an error, temporarily reduce the list of adjectives and nouns to 1 each in the file site/app/entities/chat/Chatroom.php. Log in as 2 or more users. even though there is only 1 possible base name, each user should differ by their number (eg. Quick Swan, Quick Swan 2, Quick Swan 3)
Automated Testing & Documentation
Other information