Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
phpipam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
phpipam
Commits
d33a3252
Commit
d33a3252
authored
1 year ago
by
phpipam
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
https://github.com/phpipam/phpipam
parents
a8793a98
f4ed6f30
Loading
Loading
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
functions/classes/class.Radius.php
+15
-12
15 additions, 12 deletions
functions/classes/class.Radius.php
with
15 additions
and
12 deletions
functions/classes/class.Radius.php
+
15
−
12
View file @
d33a3252
...
...
@@ -44,15 +44,16 @@
*
*
* @author: SysCo/al
* @updated: https://github.com/flaviojunior1995
* @since CreationDate: 2008-01-04
* @copyright (c) 2008 by SysCo systemes de communication sa
* @version $LastChangedRevision: 1.2.
2
$
* @version $LastChangedDate: 20
09-01-05
$
* @version $LastChangedBy:
SysCo/al
$
* @version $LastChangedRevision: 1.2.
3
$
* @version $LastChangedDate: 20
23-20-12
$
* @version $LastChangedBy:
https://github.com/flaviojunior1995
$
* @link $HeadURL: radius.class.php $
* @link http://developer.sysco.ch/php/
* @link developer@sysco.ch
* Language: PHP
4.0.7
or higher
* Language: PHP
7.2
or higher
*
*
* Usage
...
...
@@ -151,6 +152,7 @@
*
* Change Log
*
* 2023-12-20 1.2.3 https://github.com/flaviojunior1995 Updated to work with php8 and fix deprecated errors
* 2009-01-05 1.2.2 SysCo/al Added Robert Svensson feedback, Mideye RADIUS server is supported
* 2008-11-11 1.2.1 SysCo/al Added Carlo Ferrari resolution in examples (add NAS IP Address for a VASCO Middleware server)
* 2008-07-07 1.2 SysCo/al Added Pim Koeman (Parantion) contribution
...
...
@@ -174,10 +176,11 @@
* Pure PHP radius class
*
* Creation 2008-01-04
* Update 20
09-01-05
* Update 20
23-12-20
* @package radius
* @version v.1.2.
2
* @version v.1.2.
3
* @author SysCo/al
* @updated https://github.com/flaviojunior1995
*
*********************************************************************/
class
Radius
...
...
@@ -217,9 +220,10 @@ class Radius
* short description: Radius class constructor
*
* Creation 2008-01-04
* Update 20
09-01-05
* @version v.1.2.
2
* Update 20
23-12-20
* @version v.1.2.
3
* @author SysCo/al
* @updated https://github.com/flaviojunior1995
* @param string ip address of the radius server
* @param string shared secret with the radius server
* @param string radius domain name suffix (default is empty)
...
...
@@ -576,7 +580,7 @@ class Radius
function
SetAttribute
(
$type
,
$value
)
{
$attribute_index
=
-
1
;
$attribute_count
=
!
is_null
(
$this
->
_attributes_to_send
)
?
count
(
$this
->
_attributes_to_send
)
:
0
;
$attribute_count
=
count
((
array
)
$this
->
_attributes_to_send
);
for
(
$attributes_loop
=
0
;
$attributes_loop
<
$attribute_count
;
$attributes_loop
++
)
{
if
(
$type
==
ord
(
substr
(
$this
->
_attributes_to_send
[
$attributes_loop
],
0
,
1
)))
...
...
@@ -603,7 +607,7 @@ class Radius
$temp_attribute
=
chr
(
$type
)
.
chr
(
6
)
.
chr
(
$ip_array
[
0
])
.
chr
(
$ip_array
[
1
])
.
chr
(
$ip_array
[
2
])
.
chr
(
$ip_array
[
3
]);
break
;
case
'I'
:
// Integer, 32 bit unsigned value, most significant octet first.
$temp_attribute
=
chr
(
$type
)
.
chr
(
6
)
.
chr
(
(
$value
/
(
256
*
256
*
256
))
%
256
)
.
chr
(
(
$value
/
(
256
*
256
))
%
256
)
.
chr
(
(
$value
/
(
256
))
%
256
)
.
chr
(
$value
%
256
);
$temp_attribute
=
chr
(
$type
)
.
chr
(
6
)
.
chr
(
$value
/
256
*
256
*
256
%
256
)
.
chr
(
$value
/
256
*
256
%
256
)
.
chr
(
$value
*
256
/
256
%
256
)
.
chr
(
$value
%
256
);
break
;
case
'D'
:
// Time, 32 bit unsigned value, most significant octet first -- seconds since 00:00:00 UTC, January 1, 1970. (not used in this RFC)
$temp_attribute
=
NULL
;
...
...
@@ -716,8 +720,7 @@ class Radius
}
$attributes_content
=
''
;
$attribute_count1
=
!
is_null
(
$this
->
_attributes_to_send
)
?
count
(
$this
->
_attributes_to_send
)
:
0
;
$attribute_count1
=
count
((
array
)
$this
->
_attributes_to_send
);
for
(
$attributes_loop
=
0
;
$attributes_loop
<
$attribute_count1
;
$attributes_loop
++
)
{
$attributes_content
.
=
$this
->
_attributes_to_send
[
$attributes_loop
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment