You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/modules
6543 3e5c844a77
fix pam authorization (#19040) (#19047)
Backport #19040 

The PAM module has previously only checked the results of the authentication module.

However, in normal PAM practice most users will expect account module authorization to also be checked. Without doing this check in almost every configuration expired accounts and accounts with expired passwords will still be able to login.

This is likely to represent a significant gotcha in most configurations and cause most users configurations to be potentially insecure. Therefore we should add in the account authorization check.

## ⚠️ **BREAKING** ⚠️ 

Users of the PAM module who rely on account modules not being checked will need to change their PAM configuration.

However, as it is likely that the vast majority of users of PAM will be expecting account authorization to be checked in addition to authentication we should make this breaking change to make the default behaviour correct for the majority.

---

I suggest we backport this despite the BREAKING nature because of the surprising nature of this.

Thanks to @ysf for bringing this to our attention.


Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: ysf <34326+ysf@users.noreply.github.com>
3 years ago
..
activitypub Create pub/priv keypair for federation (#17071) 3 years ago
analyze Use git attributes to determine generated and vendored status for language stats and diffs (#16773) 4 years ago
appstate Decouple unit test code from business code (#17623) 3 years ago
auth fix pam authorization (#19040) (#19047) 3 years ago
avatar Fix various typos (#18219) 3 years ago
base Simplify parameter types (#18006) 3 years ago
cache Test cache during init (#17852) 3 years ago
charset Don't treat BOM escape sequence as hidden character. (#18909) (#18910) 3 years ago
context Refactor admin user filter query parameters (#18965) (#18975) 3 years ago
convert Add MirrorUpdated field to Repository API type (#18267) 3 years ago
csv Fix various typos (#18219) 3 years ago
doctor Fix various typos (#18219) 3 years ago
emoji Run processors on whole of text (#16155) 4 years ago
eventsource Simplify parameter types (#18006) 3 years ago
generate Support webauthn (#17957) 3 years ago
git Don't show context cancelled errors in attribute reader (#19006) (#19027) 3 years ago
gitgraph Collaborator trust model should trust collaborators (#18539) (#18557) 3 years ago
graceful Immediately Hammer if second kill is sent (#18823) (#18826) 3 years ago
hcaptcha hCaptcha Support (#12594) 4 years ago
highlight Add .gitattribute assisted language detection to blame, diff and render (#17590) 3 years ago
hostmatcher Simplify parameter types (#18006) 3 years ago
httpcache Use a variable but a function for IsProd because of a slight performance increment (#17368) 3 years ago
httplib refactor: move from io/ioutil to io and os package (#17109) 3 years ago
indexer Upgrade bleve from v2.0.6 to v2.3.0 (#18132) 3 years ago
json Move repository model into models/repo (#17933) 3 years ago
lfs Fix source typos (#18227) 3 years ago
log Simplify parameter types (#18006) 3 years ago
markup Correctly link URLs to users/repos with dashes, dots or underscores (#18890) (#18908) 3 years ago
metrics Refactor auth package (#17962) 3 years ago
migration Fix various typos (#18219) 3 years ago
nosql Adjust error for already locked db and prevent level db lock on malformed connstr (#18923) (#18938) 3 years ago
notification Fix problem when self-assign notification (#18797) (#18976) 3 years ago
options Remove golang vendored directory (#18277) 3 years ago
password Fixed assert statements. (#16089) 4 years ago
pprof refactor: move from io/ioutil to io and os package (#17109) 3 years ago
private Move keys to models/asymkey (#17917) 3 years ago
process Fix various typos (#18219) 3 years ago
proxy Return nil proxy function if proxy not enabled (#16742) 4 years ago
public Fix mime-type detection for HTTP server (#18371) 3 years ago
queue In disk_channel queues synchronously push to disk on shutdown (#18415) (#18788) 3 years ago
recaptcha refactor: move from io/ioutil to io and os package (#17109) 3 years ago
references Add API to get issue/pull comments and events (timeline) (#17403) 3 years ago
repository Add `GetUserTeams` (#18499) (#18531) 3 years ago
secret Simplify parameter types (#18006) 3 years ago
session Refactor auth package (#17962) 3 years ago
setting Prevent security failure due to bad APP_ID (#18678) (#18682) 3 years ago
ssh Simplify parameter types (#18006) 3 years ago
storage refactor: move from io/ioutil to io and os package (#17109) 3 years ago
structs Add MirrorUpdated field to Repository API type (#18267) 3 years ago
svg refactor: move from io/ioutil to io and os package (#17109) 3 years ago
sync Fix missing unlock in uniquequeue (#9790) 5 years ago
templates Remove golang vendored directory (#18277) 3 years ago
test Unify and simplify TrN for i18n (#18141) 3 years ago
timeutil Don't store assets modified time into generated files (#18193) 3 years ago
translation Sort locales according to their names (#18211) 3 years ago
typesniffer Read expected buffer size (#17409) 3 years ago
updatechecker Fix various typos (#18219) 3 years ago
upload Simplify parameter types (#18006) 3 years ago
uri Prevent NPE if gitea uploader fails to open url (#18080) 3 years ago
user Add gitea-vet (#10948) 5 years ago
util Increase Salt randomness (#18179) 3 years ago
validation Upgrade chi to v5 (#17298) 3 years ago
web Simplify parameter types (#18006) 3 years ago