Skip to content

ProFormA export: Uncaught exception for invalid characters #1887

Description

@MrSerth

Exporting a CodeHarbor task might fail with an uncaught exception if the error contains a Ruby object.

I discovered the bug while testing openHPI/codeocean#2503 (comment). This was caused by using the linked exercise example and adding an empty model solution (without any files). However, this error is independent of the model solution issue since any unescaped sequence starting with # seems to cause errors.

#<JSON::ParserError: unexpected character: '#<Nokogiri::XML::SyntaxError: 13'>

redirect_to :root, danger: JSON.parse(e.message).map {|msg| t("proforma_errors.#{msg}", default: msg) }.join('<br>')

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions