You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
controllers/krate/publish: Use existing_crate for upload size check
There are a couple of cases to consider here:
- if a krate with the same name exists, `existing_crate` will be `Some(_)` and the `max_upload_size` value is used.
- if no krate with the same name exists yet, `existing_crate` will be `None` and the default size limits are used.
- if no krate with the same name exists yet and there are two concurrent publish requests, the default size limits are used. this should be fine since there is no way to increase the size limits during publish or via the API in general.
tl;dr there is a potential race condition here, but it doesn't matter for this specific case
0 commit comments