···2020 def self.registered(app)
2121 app.namespace BASE_URL do
2222 post "/ciphers/:uuid/attachment" do
2323+ if !device_from_bearer
2424+ return validation_error("invalid bearer")
2525+ end
2626+2327 cipher = retrieve_cipher uuid: params[:uuid]
24282529 need_params(:data) do |p|
···62666367 app.namespace ATTACHMENTS_URL do
6468 get "/:uuid/:attachment_id" do
6969+ # no device authentication
7070+6571 a = Attachment.find_by_uuid_and_cipher_uuid(params[:attachment_id],
6672 params[:uuid])
6773 attachment(a.filename)