Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

OTA-3717: Yield an error if root.json is malformed #1417

Merged
merged 1 commit into from
Oct 17, 2019

Conversation

mike-sul
Copy link
Collaborator

It makes aktualizr behave properly if root.json is malformed (invalid json, or missing mandatory field).

But it doesn't fix the case when director or imagerepo is hacked and a hacker set the version filed to 1 in root.json.

Signed-off-by: Mykhaylo Sul myk.sul@gmail.com

Signed-off-by: Mykhaylo Sul <myk.sul@gmail.com>
@mike-sul mike-sul force-pushed the fix/OTA-3717/root-metadata-download-verification branch from 081a830 to 13e9431 Compare October 16, 2019 14:10
@codecov-io
Copy link

codecov-io commented Oct 16, 2019

Codecov Report

Merging #1417 into master will decrease coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1417      +/-   ##
==========================================
- Coverage   80.41%   80.38%   -0.04%     
==========================================
  Files         181      181              
  Lines       10642    10648       +6     
==========================================
+ Hits         8558     8559       +1     
- Misses       2084     2089       +5
Impacted Files Coverage Δ
src/libaktualizr/uptane/directorrepository.cc 95.89% <100%> (+0.17%) ⬆️
src/libaktualizr/uptane/imagesrepository.cc 89.09% <100%> (+0.2%) ⬆️
src/libaktualizr/storage/sqlstorage_base.cc 79.05% <0%> (-1.36%) ⬇️
src/libaktualizr/storage/sqlstorage.cc 76.89% <0%> (-1.04%) ⬇️
src/libaktualizr/primary/sotauptaneclient.cc 89.25% <0%> (+0.14%) ⬆️
src/aktualizr_info/main.cc 92.11% <0%> (+0.49%) ⬆️
src/libaktualizr/package_manager/ostreemanager.cc 79.08% <0%> (+1.52%) ⬆️

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 4d9358c...13e9431. Read the comment docs.

@pattivacek pattivacek merged commit 370c4a2 into master Oct 17, 2019
@pattivacek pattivacek deleted the fix/OTA-3717/root-metadata-download-verification branch October 17, 2019 12:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants