Skip to content

Commit b3a17f4

Browse files
committed
Fix for #289
Do not show apiKey on error pages. See related fix in ala-hub error.gsp page.
1 parent 3f2a5d3 commit b3a17f4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

grails-app/taglib/au/org/ala/biocache/hubs/OccurrenceTagLib.groovy

+13
Original file line numberDiff line numberDiff line change
@@ -941,4 +941,17 @@ class OccurrenceTagLib {
941941

942942
sanitizedHtml
943943
}
944+
945+
/**
946+
* Remove any text containing the apiKey value from the UI
947+
*
948+
* @attr message REQUIRED
949+
*/
950+
def stripApiKey = { attrs, body ->
951+
String message = attrs.message
952+
String output = message.replaceAll(/apiKey=[a-z0-9_\-]*/, "")
953+
log.warn "input = ${message}"
954+
log.warn "output = ${output}"
955+
out << output
956+
}
944957
}

0 commit comments

Comments
 (0)