Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Node Radius Server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Node Radius Server
Commits
5290ac37
Commit
5290ac37
authored
May 28, 2021
by
simon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: pkg upgrades and small fixes
parent
4af6eded
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3675 additions
and
5806 deletions
+3675
-5806
package-lock.json
package-lock.json
+3649
-5787
package.json
package.json
+16
-16
src/app.ts
src/app.ts
+3
-1
src/auth/SMTPAuth.ts
src/auth/SMTPAuth.ts
+1
-1
src/radius/handler/UserPasswordPacketHandler.ts
src/radius/handler/UserPasswordPacketHandler.ts
+6
-1
No files found.
package-lock.json
View file @
5290ac37
This diff is collapsed.
Click to expand it.
package.json
View file @
5290ac37
...
...
@@ -30,32 +30,32 @@
"preferGlobal"
:
true
,
"main"
:
"dist/app.js"
,
"dependencies"
:
{
"
@hokify/node-ts-cache
"
:
"
^5.
4
.1
"
,
"
@hokify/node-ts-cache
"
:
"
^5.
5
.1
"
,
"
axios
"
:
"
^0.21.1
"
,
"
debug
"
:
"
^4.3.1
"
,
"
imap-simple
"
:
"
^5.0.0
"
,
"
ldapauth-fork
"
:
"
^5.0.1
"
,
"
ldapjs
"
:
"
^2.
2.3
"
,
"
ldapjs
"
:
"
^2.
3.0
"
,
"
native-duplexpair
"
:
"
^1.0.0
"
,
"
node-cache
"
:
"
^5.1.2
"
,
"
radius
"
:
"
~1.1.4
"
,
"
smtp-client
"
:
"
^0.
3.3
"
,
"
yargs
"
:
"
~1
6.2.0
"
"
smtp-client
"
:
"
^0.
4.0
"
,
"
yargs
"
:
"
~1
7.0.1
"
},
"license"
:
"GPLv3"
,
"devDependencies"
:
{
"
@hokify/eslint-config
"
:
"
^
1.1.0
"
,
"
@types/chai
"
:
"
^4.2.1
4
"
,
"
@types/ldapjs
"
:
"
^1.0.
9
"
,
"
@types/mocha
"
:
"
^8.2.
0
"
,
"
@hokify/eslint-config
"
:
"
^
2.0.14
"
,
"
@types/chai
"
:
"
^4.2.1
8
"
,
"
@types/ldapjs
"
:
"
^1.0.
10
"
,
"
@types/mocha
"
:
"
^8.2.
2
"
,
"
@types/radius
"
:
"
0.0.28
"
,
"
@types/yargs
"
:
"
^1
5.0.12
"
,
"
chai
"
:
"
^4.
2.0
"
,
"
eslint
"
:
"
^7.
18
.0
"
,
"
mocha
"
:
"
^8.
2.1
"
,
"
prettier
"
:
"
^2.
2.1
"
,
"
standard-version
"
:
"
^9.
1
.0
"
,
"
ts-node
"
:
"
^
9.1.1
"
,
"
typescript
"
:
"
^4.
1.3
"
"
@types/yargs
"
:
"
^1
7.0.0
"
,
"
chai
"
:
"
^4.
3.4
"
,
"
eslint
"
:
"
^7.
27
.0
"
,
"
mocha
"
:
"
^8.
4.0
"
,
"
prettier
"
:
"
^2.
3.0
"
,
"
standard-version
"
:
"
^9.
3
.0
"
,
"
ts-node
"
:
"
^
10.0.0
"
,
"
typescript
"
:
"
^4.
3.2
"
}
}
src/app.ts
View file @
5290ac37
...
...
@@ -29,7 +29,9 @@ const { argv } = yargs
.
alias
(
'
s
'
,
'
secret
'
)
.
describe
(
'
secret
'
,
'
RADIUS secret
'
)
.
number
(
'
port
'
)
.
string
([
'
secret
'
,
'
authentication
'
]);
.
string
([
'
secret
'
,
'
authentication
'
])
as
{
argv
:
{
port
?:
number
;
secret
?:
string
;
authentication
?:
string
;
authenticationOptions
?:
any
};
};
console
.
log
(
`Listener Port:
${
argv
.
port
||
1812
}
`
);
console
.
log
(
`RADIUS Secret:
${
argv
.
secret
}
`
);
...
...
src/auth/SMTPAuth.ts
View file @
5290ac37
...
...
@@ -49,7 +49,7 @@ export class SMTPAuth implements IAuthentication {
tlsOptions
:
{
servername
:
this
.
host
,
// SNI (needs to be set for gmail)
},
}
);
}
as
any
);
// secure is currently not part of type def..but it is available: https://www.npmjs.com/package/smtp-client
let
success
=
false
;
try
{
...
...
src/radius/handler/UserPasswordPacketHandler.ts
View file @
5290ac37
...
...
@@ -14,7 +14,12 @@ export class UserPasswordPacketHandler implements IPacketHandler {
async
handlePacket
(
packet
:
IPacket
):
Promise
<
IPacketHandlerResult
>
{
const
username
=
packet
.
attributes
[
'
User-Name
'
];
const
password
=
packet
.
attributes
[
'
User-Password
'
];
let
password
=
packet
.
attributes
[
'
User-Password
'
];
if
(
typeof
password
!==
'
string
'
&&
password
.
indexOf
(
0x00
)
>
0
)
{
// check if there is a 0x00 in it, and trim it from there
password
=
password
.
slice
(
0
,
password
.
indexOf
(
0x00
));
}
if
(
!
username
||
!
password
)
{
// params missing, this handler cannot continue...
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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