-
Notifications
You must be signed in to change notification settings - Fork 8
/vote/submitted: UI to begin MalwareCheck #290
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Implement Malware Check FeatureThis plan implements the malware detection system that enables voters to verify their encrypted vote was submitted correctly using a second device. OverviewThe system works by:
Implementation Tasks1. Update MalwareCheck ComponentFile:
2. Create Malware Check PageFile:
3. Create API EndpointFile:
4. Update SubmittedScreenFile:
5. Helper FunctionsRecalculate Encryption (in malware-check page):
Display Selections (in malware-check page):
Data Flowflowchart TD
A[Voter Submits Vote] --> B[MalwareCheck Component]
B --> C[Generate QR Code with Vote Data]
C --> D[Voter Scans QR on 2nd Device]
D --> E[Malware Check Page Loads]
E --> F[Extract Data from URL Hash]
F --> G[Recalculate Encrypted Vote]
G --> H[Send to API Endpoint]
H --> I{Match?}
I -->|Yes| J[Show Confirmation UI]
I -->|No| K[Alert Voter + Notify Admin]
J --> L[Voter Confirms Selections]
L --> M[Save to Database]
M --> N[Update Original Vote Page]
Database SchemaCollection:
Security Considerations
|
|
Notes while getting the URL data more compact: After shorter keys:/election/1766806654863/malware-check/7313490016 After base64 encoding:#eyJzIjp7InZvdGUiOnsicCI6IkNob2NvbGF0ZSIsInIiOiI0NzA2MTQ3ODgyNjQ2MjQ1MTQyMjkzNDc5NDMwNzM4NDAxMDk0NjExMTk4MjM2MjA3MDE2MjAzNjg5NzY0OTg0MjQxNjEzNzg4Mjc1In19LCJ2IjoiNzUxMC0zMzg5LTQ3NDQifQ After base64 encoding the randomizers directly:#eyJzIjp7InZvdGUiOnsicCI6IkNob2NvbGF0ZSIsInIiOiJDbWVWMXJrN1FMRmhWRXh4ZW90VWNMOWFMX1ZCakV4SkRZcFNneEV0VkhNIn19LCJ2IjoiNzUxMDMzODk0NzQ0In0 {"s":{"vote":{"p":"Chocolate","r":"CmeV1rk7QLFhVExxeotUcL9aL_VBjExJDYpSgxEtVHM"}},"v":"751033894744"} 751033894744,vote:"Chocolate",CmeV1rk7QLFhVExxeotUcL9aL_VBjExJDYpSgxEtVHM After delimiter based encoding, instead of json:#NzUxMDMzODk0NzQ0fHZvdGV8Q2hvY29sYXRlfENtZVYxcms3UUxGaFZFeHhlb3RVY0w5YUxfVkJqRXhKRFlwU2d4RXRWSE0 751033894744|vote|Chocolate|CmeV1rk7QLFhVExxeotUcL9aL_VBjExJDYpSgxEtVHM After straight string instead of base64:/election/1766806654863/malware-check/7313490016 After removing 'election/' from path:/malware-check/1766806654863/7313490016 After base64 encoding VerifNum directly:/malware-check/1766806654863/7313490016 After encoding selections from ballot_design:/malware-check/1766806654863/7313490016 |
2nd-device checkNice-to-haves, but shouldn't block shipping:
|
1. New expandable link ("Test for Malware") to initiate a 2nd-Device Malware Check
Submitted Screen:
Addresses #16