Mercurial > hg > nginx
annotate src/core/ngx_rwlock.h @ 9274:46ecad404a29 default tip
Mail: reset imap tag to empty after authentication attempt.
We need to reset the imap tag to empty after an authentication attempt
completes, otherwise if the next line parsed is incomplete with no tag
(e.g. empty line) then we use the "tag" from the previous buffer which
is now definitely wrong and has been partially overwritten with the most
recently read data (e.g. CRLF).
An example before this patch:
S: * OK IMAP4 ready
C: foobar login a b
S: foobar NO Incorrect username or password.
C:
S:
S: obar BAD invalid command
Then with this patch:
S: * OK IMAP4 ready
C: foobar login a b
S: foobar NO Incorrect username or password.
C:
S: * BAD invalid command
author | Rob Mueller <robm@fastmailteam.com> |
---|---|
date | Wed, 15 May 2024 10:06:00 +0300 |
parents | d1816a2696de |
children |
rev | line source |
---|---|
6101 | 1 |
2 /* | |
3 * Copyright (C) Ruslan Ermilov | |
4 * Copyright (C) Nginx, Inc. | |
5 */ | |
6 | |
7 | |
8 #ifndef _NGX_RWLOCK_H_INCLUDED_ | |
9 #define _NGX_RWLOCK_H_INCLUDED_ | |
10 | |
11 | |
12 #include <ngx_config.h> | |
13 #include <ngx_core.h> | |
14 | |
15 | |
16 void ngx_rwlock_wlock(ngx_atomic_t *lock); | |
17 void ngx_rwlock_rlock(ngx_atomic_t *lock); | |
18 void ngx_rwlock_unlock(ngx_atomic_t *lock); | |
7038
d1816a2696de
Introduced ngx_rwlock_downgrade().
Ruslan Ermilov <ru@nginx.com>
parents:
6101
diff
changeset
|
19 void ngx_rwlock_downgrade(ngx_atomic_t *lock); |
6101 | 20 |
21 | |
22 #endif /* _NGX_RWLOCK_H_INCLUDED_ */ |