Giter Site home page Giter Site logo

Comments (1)

ShatalovYaroslav avatar ShatalovYaroslav commented on August 22, 2024

I just checked. And I can confirm that we have this problem. It seems that it is related to encoding of object name.
In the bucket, the object for your example store object with name ""name": "$&%ae"
with "href": "buckets/test/resources/%24%26%25ae"
and href": http://trydev.activeeon.com:8080/catalog/buckets/test/resources/%2524%2526%2525ae/raw

When do post the name is already encoded in the request:
curl -X POST --header 'Content-Type: multipart/form-data' --header 'Accept: application/json' --header 'sessionID: 7971ddaa1620384fac972b07246faf03c9377477971ddaa1620384fac98000' {"type":"formData"} 'http://trydev.activeeon.com:8080/catalog/buckets/test/resources?name=%24%26%25ae&kind=my&commitMessage=1&objectContentType=application-xml'

For $&%ae - the encoding is %24%26%25ae
For %24%26%25ae - the encoding is %2524%2526%2525ae
So then it's not possible to retrieve this object by name "$&%ae"
But it's possible to get object if get object with %24%26%25ae if specify this value in swagger

The real get request to retrieve this object:
curl -X GET --header 'Accept: application/json' --header 'sessionID: 7971ddaa1620384fac972b07246faf03c9377477971ddaa1620384fac98000' 'http://trydev.activeeon.com:8080/catalog/buckets/test/resources/%2524%2526%2525ae'

On catalog we do the encoding of name. For example the swagger API do the encoding it's side before sending the info.
So we have the issue of double encoding.

For bucket we don't have this issue, because special characters is not allowed in name of bucket.

Normally when the request is send: it's encoded on client side (browser for example). I'm not sure about job-planner portal. So maybe the solution can be send from client always uncoded value, then catalog will encode it only one time.

The other solution: do not allow to send this kind of names for objects. For example if for workflow we send this name, then it will 422 Unprocessable Entity. Because it's not allowed in workflow name to have such characters.

from catalog.

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.