Code Monkey home page Code Monkey logo

Comments (4)

akarasulu avatar akarasulu commented on September 2, 2024

This is a dangerous situation with security implications. Let's up this to critical level.

from cdn.

soffokl avatar soffokl commented on September 2, 2024

It's well known problem.
We are using md5 hash as a ID for files. Even if we will add new filename to the artifact when it's uploaded, we can't use it for downloading.
If user request download by ID and we have several name for this artifact, which filename should we provide for downloaded file?

To solve this problem we need to change ID to some unique value and migrate hashes to the separate field. But it is significant changes that will require changes in all other products.

@akarasulu btw, why did you marked it as critical and security? There is nothing about security here.

from cdn.

akarasulu avatar akarasulu commented on September 2, 2024

The problem here is that we did NOT design this to be multi-tenant and consider the potential collisions. This is left over craptoxiticity (just made up the word :D ) from Kurjun shit. We can fix this I am sure. Let me respond to your comments:

It's well known problem.

We still need to fix it.

We are using md5 hash as a ID for files. Even if we will add new filename to the artifact when it's uploaded, we can't use it for downloading.

We should not be using an identifier that cannot clash across users. I would use treat each upload as unique. So all artifacts uploaded in the system, even same files, should be linked to a unique primary key: UUID of the uploaded artifact. The md5 should still be used but as a secondary key which will produce duplicates.

Even the same thing uploaded twice by other people will be treated differently this way.

If user request download by ID and we have several name for this artifact, which filename should we provide for downloaded file? To solve this problem we need to change ID to some unique value and migrate hashes to the separate field. But it is significant changes that will require changes in all other products.

BTW I agree 100% with you.

YES unfortunately. This is the cost of early mistakes in the design.

@akarasulu btw, why did you marked it as critical and security? There is nothing about security here.

Sure let me explain. When one user can interfere with another users' shit in the system this falls under a security concern for me. It has security implications.

from cdn.

akarasulu avatar akarasulu commented on September 2, 2024

Is there currently any documentation on Gorjun?

If not can we get some basic information up here on the wiki?

Would also be nice to have a list of all the REST API endpoints.

I want to start working on how we can specify it properly going forward.

from cdn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.