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
(1a)
Galaxy S10's default voice recorder makes "*.m4a" file, but it's file header indicates it is "3gp4".
Sending it from WebUI on Chromw(Windows), its Content-Type header is "audio/x-m4a".
Mastodon returns 422 {"error":"バリデーションに失敗しました: Filehas contents that are not what they are reported to be, Fileは不正な値です, File content typeは不正な値です"}
server log:
[paperclip] Trying to link /tmp/RackMultipart20190718-13-othfiy.m4a to /tmp/ac40e4aeb9b3a9694b25c87029b5da8220190718-13-1d4nxb7.m4a
Command :: file -b --mime '/tmp/ac40e4aeb9b3a9694b25c87029b5da8220190718-13-1d4nxb7.m4a'
[paperclip] Trying to link /tmp/ac40e4aeb9b3a9694b25c87029b5da8220190718-13-1d4nxb7.m4a to /tmp/ac40e4aeb9b3a9694b25c87029b5da8220190718-13-17pbbe4.3gp
Command :: file -b --mime '/tmp/ac40e4aeb9b3a9694b25c87029b5da8220190718-13-17pbbe4.3gp'
[paperclip] Content Type Spoof: Filename d88712ccbce9d44d.3gp (application/octet-stream from Headers, ["video/3gpp"] from Extension), content type discovered from file command: application/octet-stream. See documentation to allow this combination.
[paperclip] Trying to link /tmp/ac40e4aeb9b3a9694b25c87029b5da8220190718-13-1d4nxb7.m4a to /tmp/ac40e4aeb9b3a9694b25c87029b5da8220190718-13-quntcx.3gp
Command :: file -b --mime '/tmp/ac40e4aeb9b3a9694b25c87029b5da8220190718-13-quntcx.3gp'
[paperclip] Content Type Spoof: Filename d88712ccbce9d44d.3gp (application/octet-stream from Headers, ["video/3gpp"] from Extension), content type discovered from file command: application/octet-stream. See documentation to allow this combination.
method=POST path=/api/v1/media format=html controller=Api::V1::MediaController action=create status=422 duration=37.66 view=0.23 db=4.67
Invalid or incomplete POST params
(1b)
Sending it from SubwayTooter, its Content-Type header is "audio/3gpp".
also Mastodon returns 422 {"error":"バリデーションに失敗しました: Filehas contents that are not what they are reported to be, Fileは不正な値です, File content typeは不正な値です"}
server log:
[paperclip] Trying to link /tmp/RackMultipart20190718-13-s6946l.m4a to /tmp/72e35aad684159d540119da1cd513da120190718-13-5r34a3.m4a
Command :: file -b --mime '/tmp/72e35aad684159d540119da1cd513da120190718-13-5r34a3.m4a'
[paperclip] Trying to link /tmp/72e35aad684159d540119da1cd513da120190718-13-5r34a3.m4a to /tmp/72e35aad684159d540119da1cd513da120190718-13-qrlf8m.3gp
Command :: file -b --mime '/tmp/72e35aad684159d540119da1cd513da120190718-13-qrlf8m.3gp'
[paperclip] Content Type Spoof: Filename b3d40c419d261111.3gp (application/octet-stream from Headers, ["video/3gpp"] from Extension), content type discovered from file command: application/octet-stream. See documentation to allow this combination.
[paperclip] Trying to link /tmp/72e35aad684159d540119da1cd513da120190718-13-5r34a3.m4a to /tmp/72e35aad684159d540119da1cd513da120190718-13-19x6dq6.3gp
Command :: file -b --mime '/tmp/72e35aad684159d540119da1cd513da120190718-13-19x6dq6.3gp'
[paperclip] Content Type Spoof: Filename b3d40c419d261111.3gp (application/octet-stream from Headers, ["video/3gpp"] from Extension), content type discovered from file command: application/octet-stream. See documentation to allow this combination.
method=POST path=/api/v1/media format=html controller=Api::V1::MediaController action=create status=422 duration=34.88 view=0.26 db=2.55
(2a)
then I convert audio file to aac.
Sending it from WebUI on Chromw(Windows), its Content-Type header is "audio/vnd.dlna.adts".
Mastodon returns 422 {"error":"バリデーションに失敗しました: File content typeは不正な値です, Fileは不正な値です"}
server log:
Command :: file -b --mime '/tmp/RackMultipart20190718-26-18ot8ui.aac'
[paperclip] Trying to link /tmp/RackMultipart20190718-26-18ot8ui.aac to /tmp/e8fb2bdac00e8168e98e85225b0d512220190718-26-90ete9.aac
Command :: file -b --mime '/tmp/e8fb2bdac00e8168e98e85225b0d512220190718-26-90ete9.aac'
[paperclip] Trying to link /tmp/e8fb2bdac00e8168e98e85225b0d512220190718-26-90ete9.aac to /tmp/e8fb2bdac00e8168e98e85225b0d512220190718-26-558eba
[paperclip] Trying to link /tmp/e8fb2bdac00e8168e98e85225b0d512220190718-26-90ete9.aac to /tmp/e8fb2bdac00e8168e98e85225b0d512220190718-26-5kod8q
method=POST path=/api/v1/media format=html controller=Api::V1::MediaController action=create status=422 duration=34.30 view=0.31 db=3.30
(2b)
Sending it from SubwayTooter, its Content-Type header is "audio/aac".
also Mastodon returns 422 {"error":"バリデーションに失敗しました: Filehas contents that are not what they are reported to be, Fileは不正な値です, File content typeは不正な値です"}
server log:
Command :: file -b --mime '/tmp/RackMultipart20190718-26-1ul5o59.aac'
[paperclip] Trying to link /tmp/RackMultipart20190718-26-1ul5o59.aac to /tmp/8cdd3279980ea4cc4d15280549ace0f420190718-26-gsg6ox.aac
Command :: file -b --mime '/tmp/8cdd3279980ea4cc4d15280549ace0f420190718-26-gsg6ox.aac'
[paperclip] Trying to link /tmp/8cdd3279980ea4cc4d15280549ace0f420190718-26-gsg6ox.aac to /tmp/8cdd3279980ea4cc4d15280549ace0f420190718-26-15q4qy8
[paperclip] Trying to link /tmp/8cdd3279980ea4cc4d15280549ace0f420190718-26-gsg6ox.aac to /tmp/8cdd3279980ea4cc4d15280549ace0f420190718-26-1lm3he2
method=POST path=/api/v1/media format=html controller=Api::V1::MediaController action=create status=422 duration=18.02 view=0.24 db=0.67
(3a)
then I convert audio file to m4a. (truely m4a, not 3gp)
Sending it from WebUI on Chromw(Windows), its Content-Type header is "audio/x-m4a".
Mastodon returns 422 {"error":"バリデーションに失敗しました: File content typeは不正な値です, Fileは不正な値です"}
server log:
[paperclip] Trying to link /tmp/RackMultipart20190718-26-1afvo4.m4a to /tmp/2e6169c805648d9d002765e1ecfaa12a20190718-26-10w9jz3.m4a
Command :: file -b --mime '/tmp/2e6169c805648d9d002765e1ecfaa12a20190718-26-10w9jz3.m4a'
[paperclip] Trying to link /tmp/2e6169c805648d9d002765e1ecfaa12a20190718-26-10w9jz3.m4a to /tmp/2e6169c805648d9d002765e1ecfaa12a20190718-26-1dwi2dm.mp4
Command :: file -b --mime '/tmp/2e6169c805648d9d002765e1ecfaa12a20190718-26-1dwi2dm.mp4'
[paperclip] Trying to link /tmp/2e6169c805648d9d002765e1ecfaa12a20190718-26-10w9jz3.m4a to /tmp/2e6169c805648d9d002765e1ecfaa12a20190718-26-s55ifn.mp4
Command :: file -b --mime '/tmp/2e6169c805648d9d002765e1ecfaa12a20190718-26-s55ifn.mp4'
method=POST path=/api/v1/media format=html controller=Api::V1::MediaController action=create status=422 duration=27.66 view=0.23 db=2.73
(3b)
Sending it from SubwayTooter, its Content-Type header is "audio/m4a".
also Mastodon returns 422 {"error":"バリデーションに失敗しました: Filehas contents that are not what they are reported to be, Fileは不正な値です, File content typeは不正な値です"}
server log:
[paperclip] Trying to link /tmp/RackMultipart20190718-13-cr9sqf.m4a to /tmp/b655b77e2e3aa11b67445ef97bd6a95d20190718-13-1c99mkq.m4a
Command :: file -b --mime '/tmp/b655b77e2e3aa11b67445ef97bd6a95d20190718-13-1c99mkq.m4a'
[paperclip] Trying to link /tmp/b655b77e2e3aa11b67445ef97bd6a95d20190718-13-1c99mkq.m4a to /tmp/b655b77e2e3aa11b67445ef97bd6a95d20190718-13-m62fo5.mp4
Command :: file -b --mime '/tmp/b655b77e2e3aa11b67445ef97bd6a95d20190718-13-m62fo5.mp4'
[paperclip] Trying to link /tmp/b655b77e2e3aa11b67445ef97bd6a95d20190718-13-1c99mkq.m4a to /tmp/b655b77e2e3aa11b67445ef97bd6a95d20190718-13-cso77.mp4
Command :: file -b --mime '/tmp/b655b77e2e3aa11b67445ef97bd6a95d20190718-13-cso77.mp4'
method=POST path=/api/v1/media format=html controller=Api::V1::MediaController action=create status=422 duration=22.00 view=0.24 db=2.09
(4a)
then I rename original m4a(internally 3gp) to .3gp
Sending it from WebUI on Chromw(Windows), its Content-Type header is "video/3gpp".
Mastodon returns 422 {"error":"バリデーションに失敗しました: Filehas contents that are not what they are reported to be, Fileは不正な値です, File content typeは不正な値です"}
server log:
[paperclip] Trying to link /tmp/RackMultipart20190718-13-kfrzey.3gp to /tmp/91833b68dc524a92e39b5fa2efe4ac8a20190718-13-1r1mn6p.3gp
Command :: file -b --mime '/tmp/91833b68dc524a92e39b5fa2efe4ac8a20190718-13-1r1mn6p.3gp'
[paperclip] Trying to link /tmp/91833b68dc524a92e39b5fa2efe4ac8a20190718-13-1r1mn6p.3gp to /tmp/91833b68dc524a92e39b5fa2efe4ac8a20190718-13-1wa0z5y.3gp
Command :: file -b --mime '/tmp/91833b68dc524a92e39b5fa2efe4ac8a20190718-13-1wa0z5y.3gp'
[paperclip] Content Type Spoof: Filename cc065f1c7cee9067.3gp (application/octet-stream from Headers, ["video/3gpp"] from Extension), content type discovered from file command: application/octet-stream. See documentation to allow this combination.
[paperclip] Trying to link /tmp/91833b68dc524a92e39b5fa2efe4ac8a20190718-13-1r1mn6p.3gp to /tmp/91833b68dc524a92e39b5fa2efe4ac8a20190718-13-1mkh05d.3gp
Command :: file -b --mime '/tmp/91833b68dc524a92e39b5fa2efe4ac8a20190718-13-1mkh05d.3gp'
[paperclip] Content Type Spoof: Filename cc065f1c7cee9067.3gp (application/octet-stream from Headers, ["video/3gpp"] from Extension), content type discovered from file command: application/octet-stream. See documentation to allow this combination.
method=POST path=/api/v1/media format=html controller=Api::V1::MediaController action=create status=422 duration=37.67 view=0.23 db=2.90
(4b)
Sending it from Subway Tooter, but Android's Media Scanner handles it is video, SAF content chooser show it as greyed and unselecteble.
Also I have tried WebUI on Chrome(Android).
it sent multipart request with following header part .
in this case AAC's Content-Type is different to Chrome(Windows).
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
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.
Fix #11186