Skip to content

Commit 30550b8

Browse files
committed
upgrading: Add information how variables have been replaced
1 parent 1638bcf commit 30550b8

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

docs/installation/upgrade/2.3-to-2.4.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ setup.
2525

2626
<!-- @include: include/2.4-redesign.inc -->
2727

28+
<!-- @include: include/2.4-var-expand.inc -->
29+
2830
<!-- @include: include/2.4-directory-hashing.inc -->
2931

3032
<!-- @include: include/2.4-unknown-invalid-variables.inc -->
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#### Variable expansion
2+
3+
A new [[link,var_expand]] syntax has been introduced.
4+
All old one-letter %variables have been removed,
5+
and some old variable aliases have been dropped too.
6+
7+
##### List of common short variables and their replacements.
8+
9+
| Old variable | New syntax |
10+
| -------- | ---------- |
11+
| `%a` | `%{local_port}` |
12+
| `%b` | `%{remote_port}` |
13+
| `%c` | `%{certificate}` |
14+
| `%c` | `%{secured}` |
15+
| `%d` | `%{user \| domain }` |
16+
| `%h` | `%{home}` |
17+
| `%l` | `%{local_ip }` |
18+
| `%m` | `%{mechanism}` |
19+
| `%n` | `%{user \| username }` |
20+
| `%p` | `%{client_pid }` |
21+
| `%r` | `%{remote_ip }` |
22+
| `%s` | `%{protocol}` |
23+
| `%u` | `%{user}` |
24+
| `%w` | `%{password}` |
25+
26+
##### Common modifier syntaxes and their replacements.
27+
28+
| Old syntax | New syntax |
29+
| ---------- | ---------- |
30+
| `%1Mu` | `%{user \| md5 \| hexlify(1)}` |
31+
| `%2.1Mu` | `%{user \| md5 \| hexlify \| substr(2,1)}` |
32+
| `%2.256N` | `%{ user \| md5 \| substr(0, 8) % 256 \| hex(2)}` |
33+
| `%256Nu` | `%{ user \| md5 \| substr(0, 8) % 256 \| hex}` |
34+
| `%Hu` | No conversion available, use one of the syntaxes. |
35+
| `%Ln` | `%{user \| username \| lower }` |
36+
| `%Lu` | `%{user \| lower }` |
37+
| `%Mu` | `%{user \| md5}` |
38+
39+
##### Common long variables and their replacements.
40+
41+
| Old variable | New syntax |
42+
| ------------ | ------------ |
43+
| `%{auth_domain}` | `%{auth_user \| domain}` |
44+
| `%{auth_username}` | `%{auth_user \| username}` |
45+
| `%{lip}` | `%{local_ip}` |
46+
| `%{lport}` | `%{local_port}` |
47+
| `%{mech}` | `%{mechanism}` |
48+
| `%{orig_domain }` | `%{original_user \| domain }` |
49+
| `%{orig_username}` | `%{original_user \| username }` |
50+
| `%{orig_user}` | `%{original_user}` |
51+
| `%{real_lip}` | `%{real_local_ip}` |
52+
| `%{real_lport}` | `%{real_local_port }` |
53+
| `%{real_rip}` | `%{real_remote_ip }` |
54+
| `%{real_rport}` | `%{real_remote_port}` |
55+
| `%{rip}` | `%{remote_ip}` |
56+
| `%{rport}` | `%{remote_port }` |
57+
| `%{service}` | `%{protocol}` |

0 commit comments

Comments
 (0)