Fix "Missing or invalid csrf_token parameter" on export for OR 3.5+
This commit is contained in:
parent
eb61b6a1c4
commit
f27025233c
3
orcli
3
orcli
|
@ -1636,6 +1636,7 @@ function log() {
|
||||||
# post to export-rows endpoint
|
# post to export-rows endpoint
|
||||||
# shellcheck shell=bash disable=SC2154
|
# shellcheck shell=bash disable=SC2154
|
||||||
function post_export() {
|
function post_export() {
|
||||||
|
csrf="$(get_csrf)"
|
||||||
local curloptions
|
local curloptions
|
||||||
for d in "$@"; do
|
for d in "$@"; do
|
||||||
curloptions+=("--data-urlencode")
|
curloptions+=("--data-urlencode")
|
||||||
|
@ -1657,7 +1658,7 @@ function post_export() {
|
||||||
curloptions+=("--output" "${args[--output]}")
|
curloptions+=("--output" "${args[--output]}")
|
||||||
fi
|
fi
|
||||||
# post
|
# 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!"
|
error "exporting ${args[project]} failed!"
|
||||||
else
|
else
|
||||||
if [[ ${args[--output]} ]]; then
|
if [[ ${args[--output]} ]]; then
|
||||||
|
|
Loading…
Reference in New Issue