FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.19k stars 204 forks source link

GBAK doesn't handle escaped path (and most likely filenames) on WIndows #8060

Open TommiPrami opened 1 month ago

TommiPrami commented 1 month ago

We encountered customer case where user name, and therefore appdata-path contains & character.

In batch files etc it must be escaped as ^&, now in out script otherwise works, but GBAK fails to escaped path.

I (for my surprise) have not found easy workaround that would work. (for our script). So would be nice if support for these escapes would be added into the Firebird command line applications.

List of escapes: https://www.robvanderwoude.com/escapechars.php

Need only add escaping support on those characters that are legal characters in the file names and paths (Maybe just): %^& Which easily breaks the batch scripts.

-Tee-

mrotteveel commented 1 month ago

Please provide a reproducible case that demonstrates the problem. You're now only describing a problem in prose, without demonstrating the actual problem, which makes it hard to infer what the real problem is.

As an aside, on the face of it, it sounds like a problem in your batch file, because gbak itself isn't a batch file and so gbak doesn't have to follow escaping rules that applies to batch files.

aafemt commented 1 month ago

Escaping is not task for application it is done by command processor.