Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending Sorted Attendees List and Validation for CloseRollCall #1906

Merged
merged 11 commits into from
Jun 5, 2024

Conversation

Kaz-ookid
Copy link
Contributor

@Kaz-ookid Kaz-ookid commented Jun 3, 2024

Summary

Addressing issue #1847. FE2 Organizers were sending unordered list of scanned attendees for a RollCall, enhancing risks of de-anonymization.

Main Changes

  • Organizer now sends a sorted list of attendees when closing a RollCall.
  • UI displays the attendees list in the same order it is received when opening a closed RollCall.
  • If the list displayed is not sorted, a toast warns the user about the risk of de-anonymization.
  • We do not reorder the list if it is sent unordered, we just warn the user, because if the list has been sent unordered then it is too late already.
  • Changed all utilization of HashSet to LinkedHashSet (in RollCall scope) to keep the set ordered as it came in

Other Changes

I added checking for ordered attendees list at creation, so I also added full validation of message data while I was here.

  • Added full validation for the CloseRollCall message data.
  • Added complete tests for the CloseRollCall validation.

UI Updates

  • Ensured the attendees list is displayed in the same order it is received.
  • Added a toast notification if the list is not sorted.

@Kaz-ookid Kaz-ookid requested a review from a team as a code owner June 3, 2024 17:15
Copy link

github-actions bot commented Jun 3, 2024

Pull reviewers stats

Stats of the last 30 days for popstellar:

User Total reviews Time to review Total comments
K1li4nL
🥇
12
▀▀▀
4d 19h 42m
14
▀▀▀
simone-kalbermatter
🥈
4
8h 40m
0
onsriahi14
🥉
4
1d 23h 8m
4
matteosz
4
4d 1h 8m
5
pierluca
2
3d 11h 3m
1
arnauds5
2
5d 15h 3m
▀▀
0
emonnin-epfl
2
3h 14m
2
DanielTavaresA
2
2d 10h 22m
8
▀▀
quadcopterman
2
6d 13h 46m
▀▀
1
Tyratox
1
44m
0
sgueissa
1
6d 11h 44m
▀▀
1
osm-alt
1
25m
0
Kaz-ookid
1
1d 2h 1m
5
⚡️ Pull request stats

@Kaz-ookid Kaz-ookid self-assigned this Jun 3, 2024
@Kaz-ookid Kaz-ookid linked an issue Jun 3, 2024 that may be closed by this pull request
@Kaz-ookid Kaz-ookid added the bug-fix Fixes a bug label Jun 4, 2024
Copy link
Contributor

@matteosz matteosz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really good job! Just few comments

rollCallRepo.updateRollCall(LAO_ID, ROLL_CALL_UNSORTED_ATTENDEES)
rollCallRepo.updateRollCall(LAO_ID, closeRollCall(ROLL_CALL_UNSORTED_ATTENDEES))
InstrumentationRegistry.getInstrumentation().waitForIdleSync()
openRollCallWithDescription(ROLL_CALL_UNSORTED_ATTENDEES)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this call here may actually be useless, it should be sufficient to update the repository (as long as you modify the roll call that is currently set in the fragment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure, tests do not pass the rollCallListAttendees visibility part if I don't put this line

…-list' into work-fe2-maxime-sorted-attendees-list

# Conflicts:
#	fe2-android/app/src/main/java/com/github/dedis/popstellar/ui/lao/event/rollcall/RollCallArrayAdapter.kt
#	fe2-android/app/src/main/java/com/github/dedis/popstellar/ui/lao/event/rollcall/RollCallFragment.kt
Copy link

sonarcloud bot commented Jun 5, 2024

Quality Gate Passed Quality Gate passed for 'PoP - Be2-Scala'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Jun 5, 2024

Quality Gate Passed Quality Gate passed for 'PoP - PoPCHA-Web-Client'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Jun 5, 2024

Quality Gate Passed Quality Gate passed for 'PoP - Be2-Scala'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Jun 5, 2024

Quality Gate Passed Quality Gate passed for 'PoP - Be1-Go'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Jun 5, 2024

Copy link
Contributor

@matteosz matteosz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now!

@Kaz-ookid Kaz-ookid added this pull request to the merge queue Jun 5, 2024
Merged via the queue into master with commit 960f60a Jun 5, 2024
17 checks passed
@Kaz-ookid Kaz-ookid deleted the work-fe2-maxime-sorted-attendees-list branch June 5, 2024 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Android Organizer not sorting tokens, deanonymization
2 participants