Skip to content

Groovy class syntax can cause compatibility issue with extension "Wiki Link URL Normalizer" #13

@oanat

Description

@oanat

Noticed the following issue on a wiki using XS 10.11.8 (did not manage to reproduce locally):

Results:

  • The wiki page displays an error
    {{Failed to execute the [groovy] macro. Cause: [startup failed: script15992051810231037558333.groovy: 169: expecting ')', found '~' @ line 169, column 12. ~|| request.getParameterMap().containsKey(AZURE_PARAM_ID_TOKEN) ^ 1 error ]. Click on this message for details.}}
  • the Groovy class http://myserver/xwiki/bin/view/Office365/Groovy page contains an escaped line that cannot be removed upon save (editing the page and removing the line does not work, the "~" is kept after the save):
    def containsAuthenticationData(request) { def map = request.getParameterMap(); return request.getMethod().equalsIgnoreCase("POST") && (request.getParameterMap().containsKey(AZURE_PARAM_ERROR) ~|| request.getParameterMap().containsKey(AZURE_PARAM_ID_TOKEN) ~|| request.getParameterMap().containsKey(AZURE_PARAM_CODE)); }

Expected result: the Office365 macro is displayed without error

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions