question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ngclient: persist metadata in a safer way

See original GitHub issue

tuf/ngclient/updater.py: Updater._persist_metadata():

    with open(os.path.join(self._dir, f"{rolename}.json"), "wb") as f:
        f.write(data)

this is not as safe as it should be (as file could be corrupted midway through). This should work:

  • write content to tempfile
  • use sslib_util.persist_temp_file() to move tempfile to correct filepath

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
suvadityamukcommented, Aug 23, 2021

Understood, I’ll make the changes accordingly. Could you possibly assign this task to me?

1reaction
suvadityamukcommented, Aug 22, 2021

Hey. I have prepared a fix to this. Should I put up a pull request on this? It’s my first open-source contribution, so any inputs will be much appreciated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is there a way to skip persisting metadata for Spring Batch ...
Is there a way to keep metadata of the first type of jobs (e.g. reports processing) in the database while not using database...
Read more >
Working with object metadata - Amazon Simple Storage Service
Name Description Can user modify the value? Date Current date and time. No Content‑Disposition Object presentational information. Yes Content‑Length Object size in bytes. No
Read more >
How clean is your document? What you need to know about ...
This is a safer way to go than sending Word documents, Kinas said, both in terms of obscuring the metadata and in terms...
Read more >
Consider Metadata When Sending Files - Safe Computing
Metadata is data that defines or describes another piece of data. ... Privacy options heading, select Remove personal information from this file on...
Read more >
Metadata Handling | dpBestflow
The most secure and efficient way to handle the metadata you create is by using catalog software. The catalog can harvest, manipulate, and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found