包含空格的 subversion authz 路径 [英] subversion authz path containing spaces

查看:44
本文介绍了包含空格的 subversion authz 路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何为包含空格的路径设置 authz 文件?

How do I setup the authz file for a path which contains spaces?

我尝试了各种方法来逃避空间,但都没有奏效.

I tried various methods to escape the spaces but none of them worked.

[/"some path"]
[/some%20path]
[/some\ path]
[\"some path\"]

推荐答案

我刚刚检查了 svn 源代码和文件解析器(在 libsvn_subr/config_file.c:svn_config__parse_file() 中)允许方括号内的任何内容,除了]", "\n".换句话说,它应该在没有任何转义的情况下工作.

I just checked the svn source code and the file parser (in libsvn_subr/config_file.c:svn_config__parse_file()) allows anything inside the square brackets except a "]", "\n". In other words, it should work with no escaping whatsoever.

为了确认这一点,我将此规则添加到临时存储库:

To confirm this I added this rule to a scratch repository:

[/a/some really long name.xlsx]
* =

不出所料,它拒绝了我的访问.此外,我检查了我的生产存储库并发现了几个类似规则的实例,所以它必须有效,否则我之前会收到投诉:)

As expected, it denied me access. Furthermore, I checked my production repositories and found several instances of rules like that, so it must work, otherwise I would have gotten complaints before now :)

这篇关于包含空格的 subversion authz 路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆