wtg / shuttletracker

🚐 Shuttle tracking for RPI.
https://shuttles.rpi.edu
GNU Affero General Public License v3.0
46 stars 53 forks source link

Add input sanitation for bus button emoji choice #303

Closed elihschiff closed 3 years ago

elihschiff commented 3 years ago
Do not merge until tested

What:

 

The bus button does not check if the emoji that is being sent is a valid emoji

How:

 

This fixes that issue by checking a list of valid buses and only sending the bus button message if the emoji is in that valid list

Included Commits:

 

Add input sanitation for bus button emoji choice

Is This Related to An Issue? (link if applicable):

  no, but we did talk on discord about it

Additional Notes:

In general, I am confused by this pr template. Could you add some comments to the template that explain what each word is supposed to mean

codecov[bot] commented 3 years ago

Codecov Report

Merging #303 into master will decrease coverage by 0.05%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #303      +/-   ##
==========================================
- Coverage   37.75%   37.69%   -0.06%     
==========================================
  Files          17       17              
  Lines        1396     1398       +2     
==========================================
  Hits          527      527              
- Misses        807      809       +2     
  Partials       62       62              
Impacted Files Coverage Δ
api/fusion.go 10.72% <0.00%> (-0.09%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2e42194...baa9066. Read the comment docs.