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

More issues #282

Merged
merged 18 commits into from
Mar 30, 2023
Merged

More issues #282

merged 18 commits into from
Mar 30, 2023

Conversation

joeroe
Copy link
Contributor

@joeroe joeroe commented Mar 30, 2023

joeroe added 18 commits March 22, 2023 15:33
The low-hanging fruit: MISSING_C14_AGE, VERY_OLD_C14, MISSING_C14_ERROR,
MISSING_D13C, MISSING_D13C_ERROR, MISSING_C14_METHOD,
MISSING_C14_LAB_ID, and MISSING_C14_LAB
Validating in the routes.
Splits out C14::LabIdentifier as a value object and adds methods for
validation and extraction of lab codes and lab numbers.
I don't like it, but it's pretty common...
To fix v1 API csv building and generally avoid constant sample.material.present? etc. checks
Solves issues with c14s with nil lab IDs.

Not the most pleasant model name, but having a name that collides with the
attribute lab_identifier causes problems.
# GET /issues/references/:issue
def index
if params.has_key?(:issue)
@references = Reference.send(params[:issue])

Check failure

Code scanning / CodeQL

Code injection

This code execution depends on a [user-provided value](1).
if params[:issue] == "missing"
@samples = Sample.missing
if params.has_key?(:issue)
@samples = Sample.send(params[:issue])

Check failure

Code scanning / CodeQL

Code injection

This code execution depends on a [user-provided value](1).
# GET /issues/c14s/:issue
def index
if params.has_key?(:issue)
@c14s = C14.send(params[:issue])

Check failure

Code scanning / CodeQL

Code injection

This code execution depends on a [user-provided value](1).
# GET /issues/sites/:issue
def index
if params.has_key?(:issue)
@sites = Site.send(params[:issue])

Check failure

Code scanning / CodeQL

Code injection

This code execution depends on a [user-provided value](1).
if params[:issue] == "unknown_taxon"
@taxons = Taxon.unknown_taxon
if params.has_key?(:issue)
@taxons = Taxon.send(params[:issue])

Check failure

Code scanning / CodeQL

Code injection

This code execution depends on a [user-provided value](1).
@joeroe
Copy link
Contributor Author

joeroe commented Mar 30, 2023

I am going to skip review on this, because I'd like to use the new filtering interface in production ASAP. Any ensuing problems are on me, @MartinHinz!

@joeroe joeroe merged commit fb04bf4 into master Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant