I also encountered the same issue.
It seems to be fixed on iOS 17 beta. (I don't have iOS 16 device, so I cant check it :)
Some application framework raises an error on receiving pkcs7 body with application/x-www-form-urlencoded header, and we would have to handle it by monkey-patching the web framework.
For example Ruby on Rails raises error and we can avoid it by monkey-patching Rack with middleware like this
class FixContentTypeMiddleware
def initialize(app)
@app = app
end
def call(env)
if env['REQUEST_PATH'] == '/mdm-byod/enroll'
# iOS 15 is buggy. It sends Content-Type: application/x-www-form-urlencoded
# and Rack raises errors Invalid query parameters: invalid %-encoding.
if env['CONTENT_TYPE'] == 'application/x-www-form-urlencoded'
# just avoid it by rewriting Content-Type
env['CONTENT_TYPE'] = 'application/pkcs7-signature'
end
end
@app.call(env)
end
end
Topic:
Business & Education
SubTopic:
Device Management
Tags: