Skip to content

Commit 789d055

Browse files
committed
Deprecate support for in-query password comparison in sqlauth.
The only hashing systems that support this are wildly insecure and having two ways of doing this just makes it less clear for users.
1 parent 18f89d6 commit 789d055

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

docs/4/modules/sqlauth.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ configuration:
2727
required: false
2828
default: md5,sha256
2929
description: |-
30-
A comma-delimited list of hash algorithms to check the password against.
30+
*Deprecated!* A comma-delimited list of hash algorithms to check the password against.
3131
- name: kdf
3232
type: Text
3333
required: false
@@ -61,37 +61,38 @@ configuration:
6161
$dhost | The public hostname of the connecting user.
6262
$duser | The public username of the connecting user.
6363
$host | The real hostname of the connecting user.
64-
$md5pass | An MD5 hash of the password sent with `/PASS` by the connecting user (requires [the md5 module](/4/modules/md5)).
64+
$md5pass | *Deprecated!* An MD5 hash of the password sent with `/PASS` by the connecting user (requires [the md5 module](/4/modules/md5)).
6565
$nick | The nickname of the connecting user.
66-
$pass | The password sent with `/PASS` by the connecting user.
66+
$pass | *Deprecated!* The password sent with `/PASS` by the connecting user.
6767
$real | The real name of the connecting user.
6868
$server | The name of the server the connecting user connected to.
6969
$sid | The unique identifier of the server the connecting user connected to.
70-
$sha256pass | A SHA-256 hash of the password sent with `/PASS` by the connecting user (requires [the sha2 module](/4/modules/sha2)).
70+
$sha256pass | *Deprecated!* A SHA-256 hash of the password sent with `/PASS` by the connecting user (requires [the sha2 module](/4/modules/sha2)).
7171
$user | The real username of the connecting user.
7272
$uuid | The UUID of the connecting user.
7373
7474
example: |-
75-
Checks the password using the existence of a row returned from the database:
75+
Checks the password by comparing against a database field specified in the config:
7676
7777
```xml
78-
<sqlauth hash="sha256"
78+
<sqlauth column="password"
79+
kdf="bcrypt"
7980
dbid="sqlauth"
8081
killreason="Access denied"
81-
query="SELECT * FROM users WHERE name='$nick' AND password='$sha256pass' LIMIT 1"
82+
query="SELECT * FROM users WHERE name='$nick' LIMIT 1"
8283
verbose="no">
8384
```
8485
85-
Checks the password by comparing against a database field specified in the config:
86+
*Deprecated!* Checks the password using the existence of a row returned from the database:
8687
8788
```xml
88-
<sqlauth column="password"
89-
kdf="bcrypt"
89+
<sqlauth hash="sha256"
9090
dbid="sqlauth"
9191
killreason="Access denied"
92-
query="SELECT * FROM users WHERE name='$nick' LIMIT 1"
92+
query="SELECT * FROM users WHERE name='$nick' AND password='$sha256pass' LIMIT 1"
9393
verbose="no">
9494
```
95+
9596
- name: sqlexemption
9697
description: |-
9798
The `<sqlexemption>` tag defines nick!user@host or nick!user@ip/cidr mask which are exempt from the authentication requirement. This tag can be defined as many times as required.
@@ -109,4 +110,6 @@ configuration:
109110
```
110111
111112
special_notes: |-
113+
{% include "4/modules/_hash_table.md" %}
114+
112115
{% include "4/modules/_sql_table.md" %}

0 commit comments

Comments
 (0)