From f27025233ca35e692ad230fab1c3c6a281755a4c Mon Sep 17 00:00:00 2001 From: Tobias Zeumer Date: Sat, 7 Dec 2024 16:46:35 +0100 Subject: [PATCH] Fix "Missing or invalid csrf_token parameter" on export for OR 3.5+ --- orcli | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/orcli b/orcli index 621e85a..9f682ad 100755 --- a/orcli +++ b/orcli @@ -1636,6 +1636,7 @@ function log() { # post to export-rows endpoint # shellcheck shell=bash disable=SC2154 function post_export() { + csrf="$(get_csrf)" local curloptions for d in "$@"; do curloptions+=("--data-urlencode") @@ -1657,7 +1658,7 @@ function post_export() { curloptions+=("--output" "${args[--output]}") fi # post - if ! curl -fs "${curloptions[@]}" "${OPENREFINE_URL}/command/core/export-rows"; then + if ! curl -fs "${curloptions[@]}" "${OPENREFINE_URL}/command/core/export-rows${csrf}"; then error "exporting ${args[project]} failed!" else if [[ ${args[--output]} ]]; then