pyld icon indicating copy to clipboard operation
pyld copied to clipboard

MAX_CONTEXT_URLS set to low

Open stuchalk opened this issue 5 years ago • 3 comments

I have a context that is split over many context files (https://stuchalk.github.io/scidata/contexts/scidata.jsonld) and as a result is getting an error on the JSON-LD playground that uses this package. Can the value be increased to 30, as 10 seems too low?

stuchalk avatar Feb 25 '20 16:02 stuchalk

The playground uses jsonld.js, but the limit is also the same in pyld. 10 is arbitrary, and it looks like there's no easy way to adjust it at the moment. There probably should be, it's just no one has mentioned running into the issue until now. The limit is there to avoid potential performance issues, and to avoid potential DoS attacks if using untrusted data. But certainly there are valid use cases.

I think adding an option in libs is a good idea. I'm unsure if raising the default is good or not.

The workaround at the moment is to manually or programatically combine some of the sub-contexts into one file.

Added an issue about it for jsonld.js since that would be needed for the playground: https://github.com/digitalbazaar/jsonld.js/issues/368

davidlehn avatar Feb 26 '20 18:02 davidlehn

Is there any update to this request. I was able to change the MAX_CONTENT_URLS variable in context_resolver.py to 30 very easily...

stuchalk avatar Dec 01 '20 21:12 stuchalk

Sorry to keep bugging about this but if there is any way to update the value it would be appreciated...

stuchalk avatar May 07 '21 19:05 stuchalk