#3128 API for getting some config values
Closed: Dropped 2 years ago by tkopecek. Opened 2 years ago by tkopecek.

In few cases it makes sense to report more than just "version". Client would like to know e.g. which plugins are available at the hub or web ui wants to know which limits are put on usernames (#3028)

I would propose a new API getConfig or extending getKojiVersion(config=True) to return selected values from the config. I'm not sure which variant is better. Maybe separate call is less confusing.


Personally I think it's faster to assume the hub has the features you need. It puts more strain on the hub if every client does a lot of Look Before You Leap patterns.

If the hub doesn't have a call or a username is invalid, then the client can handle that exception. (This is also why I want to add more custom exceptions).

For example a lot of clients call getAPIVersion and completely throw that information away anyway.

Agreed - web ui is a bit different case. It has a separate set of validation regexps because of XSS. These can differ a lot from allowed strings on hub (more restrictive). We need to have some sane way to align these regexps, so web ui can e.g. search all existing usernames/packages/etc.

Metadata Update from @tkopecek:
- Custom field Size adjusted to None

2 years ago

Metadata Update from @tkopecek:
- Issue tagged with: discussion

2 years ago

So, we've decided to go other way. Our real problem in webui is potential XSS attack and regexps from #2652 are not needed to fix this issue. So, #3155 was filed for rewriting this part of the code.

Metadata Update from @tkopecek:
- Issue close_status updated to: Dropped
- Issue status updated to: Closed (was: Open)

2 years ago

Metadata Update from @tkopecek:
- Issue set to the milestone: None (was: 1.28)

2 years ago

Login to comment on this ticket.

Metadata