Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
noc
noc
Commits
ed92fe2d
Commit
ed92fe2d
authored
Jun 16, 2021
by
Andrey Vertiprahov
Browse files
Merge branch 'cherry-pick-
861d6bf4
' into 'release-20.4'
release-20.4:Backport!5447 See merge request
!5453
parents
ff8ce9e0
e1274d61
Changes
1
Hide whitespace changes
Inline
Side-by-side
services/login/backends/radius.py
View file @
ed92fe2d
...
...
@@ -7,7 +7,7 @@
# Third-party modules
from
pyrad.packet
import
AccessAccept
,
AccessRequest
from
pyrad.client
import
Client
from
pyrad.client
import
Client
,
Timeout
from
pyrad.dictionary
import
Dictionary
from
noc.core.comp
import
smart_bytes
...
...
@@ -29,7 +29,7 @@ class RADIUSBackend(BaseAuthBackend):
req
[
"User-Password"
]
=
req
.
PwCrypt
(
password
)
try
:
reply
=
client
.
SendPacket
(
req
)
except
client
.
Timeout
:
except
Timeout
:
raise
self
.
LoginError
(
"Timed out"
)
if
reply
.
code
!=
AccessAccept
:
raise
self
.
LoginError
(
"RADIUS Authentication failed. Code=%s"
,
reply
.
code
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment