Conversation
Fix content type detection for JSON files.
rails/sprockets already has no master branch.
Fixed non-existent branch name
Restored the condition to execute write_uploader
Co-authored-by: Mitsuhiro Shibuya <mit.shibuya@gmail.com>
…ions Set `:content_type` in `copy_options` for GCS.
Have RemoteFile raise CarrierWave::DownloadError when the HTTP response is of a type that has no content, according to the standards. In those cases, response.body returns nil. There are 8 response types that have no body, 4 of which we can get, so just check whether the body was nil. Fixes #2632
Includes a backwards compatibility mode for SsrfFilter 1.0, which is needed for Ruby 2.5 and JRuby 9.2. Also includes a local version constraint for fog-google for Ruby 2.5 and JRuby 9.2 because of a known but undeclared incompatibility in that gem. gemfiles/rails-6-1.gemfile already has this fix. [Fixes #2625]
Support ssrf_filter 1.1
chore: minor refactor from select first to detect
Raise DownloadError when no content is returned
…ptions fix: ruby 2.7 kwarg warning in uploader process
Given that it is not advised to put other stuff in the same directory as CarrierWave's cache, this fix makes clean_cache! not break then. Based on the similar fix for the Fog storage clean_cache!.
Local storage clean_cache! fix for off-topic files
Enable to override configurations by 'false' on a per-uploader basis
These specs originate from this one: fe90e05#diff-139363042a1d27e5830373d80deb5a2f8e7afcb68e28be55a73ffbd587517c0dR55-R57 But it was implemented in a wrong way (without calling #image=). Also this assumption doesn't hold true after #2658.
While `write_uploader` is aliased to `write_attribute` by default, it may be overridden in the model. This change ensures that the override method is called when clearing the attribute.
Fixes #2732 Starting in Alpine Linux 3.19, installing the `imagemagick` package no longer includes support for JPG, SVG, and other image formats.[1] This means upgrading Alpine linux on a server can cause Carrierwave to start failing with CarrierWave::ProcessingError when uploading images. The root cause isn't obvious from this error. However when ImageMagick is not installed, Carrierwave raises MiniMagick::Error instead of CarrierWave::ProcessingError, and includes the detailed error message. This fix also raises MiniMagick::Error if ImageMagick is installed but is missing the delegates required for the image format being manipulated. This will make it easier to debug when uploads are failing. [1] https://maxsmolens.org/posts/imagemagick-packaging-change-on-alpine-linux/
mb_chars has been deprecated. and can be replaced rails/rails#54081
…r-on-dup Fix #dup with custom serialisation
…issing-jpg-svg-delegates-on-alpine Raise MiniMagick::Error if ImageMagick is missing delegates needed for image formats
Remove use of deprecated mb_chars method
Marking ruby-head as experimental, until cucumber works on it
By providing a 'changelog_uri' in the metadata of the gemspec a 'Changelog' link will be shown on https://rubygems.org/gems/carrierwave which makes it quick and easy for someone to check on the changes introduced with a new version. Details of this functionality can be found on https://guides.rubygems.org/specification-reference/#metadata
Adds a commented example of `content_type_allowlist` (/image\//) to the generated uploader. It mirrors the existing `extension_allowlist` comment and helps users mitigate content-type spoofing attacks.
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix "Lint/Void: Variable storage used in void context." The current logic does nothing. So just add a comment to fix the linter. * Avoid to test against JRuby 10.1.x It seems that activerecord-jdbc-adapter doesn't work with the latest version.
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v6...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
…ctions/actions/checkout-7 Bump actions/checkout from 6 to 7
* upgrade marcel gem currently locked to '~> 1.0.0', lock to '~> 1.0' * Bump actions/checkout from 6 to 7 Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v6...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * loosen marcel restriction * fix issue from upgraded MiniMagick --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: RobL <contact@robl.me> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…te!` (#2817) Previously, when `manipulate!` was called with a block that returned nil for every frame, the resulting empty frames array caused an `ArgumentError` in frames.append(true)`. This is because RMagick's `ImageList#append` does not accept a bare true value on an empty list. https://github.com/rmagick/rmagick/blob/9788a6d43b3aebb5a1ad72013f1fe0b3affa300f/ext/RMagick/rmilist.cpp#L143 https://github.com/rmagick/rmagick/blob/9788a6d43b3aebb5a1ad72013f1fe0b3affa300f/ext/RMagick/rmilist.cpp#L877 This made the error hard to diagnose since the root cause (unsupported format or a block that always returns nil) was not surfaced. It looks like this happens when an image file isn't supported by ImageMagick. (In our case, this happens with HEIC files with unsupported compatible brands) So this changed to check frames and if it's empty, raises an appropriate error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.