Skip to content
New issue

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

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

Already on GitHub? # to your account

Allow form file input to accept other MIME types #6089

Merged
merged 12 commits into from
Jan 17, 2023

Conversation

davetsay
Copy link
Contributor

Closes #6088

Describe your changes:

Allow dev to specify accept attribute on form file inputs. json files handling remains unchanged, but for now all other types are passed onto form callback without being read in.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this change backwards compatible? For example, developers won't need to change how they are calling the API or how they've extended core plugins such as Tables or Plots.

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Command line build passes?
  • Has this been smoke tested?
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Reviewer has tested changes by following the provided instructions?
  • Changes appear not to be breaking changes?
  • Appropriate automated tests included?
  • Code style and in-line documentation are appropriate?
  • Has associated issue been labelled unverified? (only applicable if this PR closes the issue)
  • Has associated issue been labelled bug? (only applicable if this PR is for a bug fix)

@codecov
Copy link

codecov bot commented Dec 29, 2022

Codecov Report

Merging #6089 (c08174c) into master (14c9dd0) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6089      +/-   ##
==========================================
- Coverage   54.65%   54.63%   -0.02%     
==========================================
  Files         600      600              
  Lines       23940    23950      +10     
  Branches     2115     2117       +2     
==========================================
+ Hits        13084    13085       +1     
- Misses      10256    10265       +9     
  Partials      600      600              
Flag Coverage Δ *Carryforward flag
e2e-ci 39.49% <ø> (ø) Carriedforward from 8a83923
e2e-full 51.23% <ø> (ø) Carriedforward from 8a83923
e2e-stable 50.09% <ø> (ø)
unit 50.22% <0.00%> (-0.03%) ⬇️

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
src/api/forms/components/controls/FileInput.vue 0.00% <0.00%> (ø)
...ettingsSynchronizer/URLTimeSettingsSynchronizer.js 97.97% <0.00%> (+1.01%) ⬆️

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 14c9dd0...c08174c. Read the comment docs.

@davetsay davetsay changed the title Test form file input Allow form file input to accept other MIME types Dec 30, 2022
@unlikelyzero unlikelyzero added this to the Target:2.1.6 milestone Dec 31, 2022
value: fileInfo
};

this.$emit('onChange', data);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any way this could be used to do something malicious using a file with some executable code?

@khalidadil khalidadil merged commit 8125632 into master Jan 17, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

form file inputs should be able to accept mime types other than json
3 participants