Branch: refs/heads/master
Home: https://github.com/openSUSE/open-build-service
Commit: bd29b878418909ecbad10e65e40b22672d6a2e72
https://github.com/openSUSE/open-build-service/commit/bd29b878418909ecbad10e...
Author: Björn Geuken
Date: 2018-04-10 (Tue, 10 Apr 2018)
Changed paths:
M src/api/lib/backend/api/sources/package.rb
A src/api/spec/cassettes/BsRequestAction/encoding_of_sourcediffs/1_1_1.yml
A src/api/spec/cassettes/BsRequestAction/encoding_of_sourcediffs/1_1_2.yml
M src/api/spec/models/bs_request_action_spec.rb
M src/api/spec/support/vcr.rb
Log Message:
-----------
[frontend] Fix encoding of sourcediffs
When the frontend requests a sourcediff that is not in xml format the
returned string is not encoded. Which means that the content can have
differently encoded characters, eg. a tarball that contains diffferently
encoded files.
When handling such a sourcediff string in OBS this could cause encoding
issues. For example sourcediff.present? would raise an
ArgumentError: invalid byte sequence in UTF-8.
To solve this we replace non-UTF-8 encoded bytes with '?', the
default replacement string defined by String#encode.
https://ruby-doc.org/core-2.2.0/String.html#method-i-encode
A note for the VCR configuration change:
Since the backend doesn't return properly encoded data, VCR would fail
on this when handling the backend response. To prevent this we have to tell
VCR to not encode such requests as described here:
http://www.rubydoc.info/github/vcr/vcr/VCR%2FConfiguration%3Apreserve_exact_...
Commit: 255182c87da67da1a408b93eda7fcdd8590f6b56
https://github.com/openSUSE/open-build-service/commit/255182c87da67da1a408b9...
Author: Björn Geuken
Date: 2018-04-10 (Tue, 10 Apr 2018)
Changed paths:
M src/api/app/views/event_mailer/_submit_action.text.erb
R src/api/spec/cassettes/EventMailer/_event/for_an_event_of_type_Event_Request/using_different_encodings/does_not_throw_an_incompatible_character_encodings_exception.yml
M src/api/spec/mailers/event_mailer_spec.rb
Log Message:
-----------
Revert "[webui] Fix encodings exception in event mailer"
This reverts commit f35bee8f94991a165561f8a56e7c92747c1ad10a.
This commit was encoding source diff content in the event mailer
template. With 5f78f1abe23f91eca8d077fbec19e25125accd92 we now encode
the source diff right when we get it from the backend. Which means that
we can stop force encoding it in the template.
Commit: 779f3b75b43849f4339682ec4232e9e98a94ed94
https://github.com/openSUSE/open-build-service/commit/779f3b75b43849f4339682...
Author: Björn Geuken
Date: 2018-04-10 (Tue, 10 Apr 2018)
Changed paths:
M src/api/app/mailers/event_mailer.rb
Log Message:
-----------
Revert "[webui] Rescue `mail` callbacks in `EventMailer`"
This reverts commit 1f259e35d4eb6c866163530de29ae22bb39204b6.
This code was added to debug the encoding exceptions we got when sending
event mails. Since this got fixed now, we don't need this anymore.
Commit: 42f406c41919435a2ba825c589adb60c68c4dd58
https://github.com/openSUSE/open-build-service/commit/42f406c41919435a2ba825...
Author: Björn Geuken
Date: 2018-04-10 (Tue, 10 Apr 2018)
Changed paths:
M src/api/app/mailers/event_mailer.rb
M src/api/app/views/event_mailer/_submit_action.text.erb
M src/api/lib/backend/api/sources/package.rb
A src/api/spec/cassettes/BsRequestAction/encoding_of_sourcediffs/1_1_1.yml
A src/api/spec/cassettes/BsRequestAction/encoding_of_sourcediffs/1_1_2.yml
R src/api/spec/cassettes/EventMailer/_event/for_an_event_of_type_Event_Request/using_different_encodings/does_not_throw_an_incompatible_character_encodings_exception.yml
M src/api/spec/mailers/event_mailer_spec.rb
M src/api/spec/models/bs_request_action_spec.rb
M src/api/spec/support/vcr.rb
Log Message:
-----------
Merge pull request #4828 from bgeuken/fix_request_encoding
Fix request encoding
Compare: https://github.com/openSUSE/open-build-service/compare/4414f4c4db8e...42f406...