Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
3a9501a4
Commit
3a9501a4
authored
Aug 06, 2016
by
Ad Schellevis
Committed by
Franco Fichtner
Aug 13, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IDS / crash reports, closes
https://github.com/opnsense/core/issues/1117
(cherry picked from commit
7bf1343b
)
parent
ade7bf5e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
SettingsController.php
...c/app/controllers/OPNsense/IDS/Api/SettingsController.php
+9
-5
IDS.php
src/opnsense/mvc/app/models/OPNsense/IDS/IDS.php
+2
-2
No files found.
src/opnsense/mvc/app/controllers/OPNsense/IDS/Api/SettingsController.php
View file @
3a9501a4
...
...
@@ -147,15 +147,19 @@ class SettingsController extends ApiControllerBase
/**
* get rule information
* @param $sid rule identifier
* @param
string|null
$sid rule identifier
* @return array|mixed
*/
public
function
getRuleInfoAction
(
$sid
)
public
function
getRuleInfoAction
(
$sid
=
null
)
{
// request list of installed rules
if
(
!
empty
(
$sid
))
{
$backend
=
new
Backend
();
$response
=
$backend
->
configdpRun
(
"ids query rules"
,
array
(
1
,
0
,
'sid/'
.
$sid
));
$data
=
json_decode
(
$response
,
true
);
}
else
{
$data
=
null
;
}
if
(
$data
!=
null
&&
array_key_exists
(
"rows"
,
$data
)
&&
count
(
$data
[
'rows'
])
>
0
)
{
$row
=
$data
[
'rows'
][
0
];
...
...
src/opnsense/mvc/app/models/OPNsense/IDS/IDS.php
View file @
3a9501a4
...
...
@@ -131,7 +131,7 @@ class IDS extends BaseModel
public
function
getRuleStatus
(
$sid
,
$default
)
{
$this
->
updateSIDlist
();
if
(
array_key_exists
(
$sid
,
$this
->
sid_list
))
{
if
(
!
empty
(
$sid
)
&&
array_key_exists
(
$sid
,
$this
->
sid_list
))
{
return
(
string
)
$this
->
sid_list
[
$sid
]
->
enabled
;
}
else
{
return
$default
;
...
...
@@ -148,7 +148,7 @@ class IDS extends BaseModel
public
function
getRuleAction
(
$sid
,
$default
,
$response_plain
=
false
)
{
$this
->
updateSIDlist
();
if
(
array_key_exists
(
$sid
,
$this
->
sid_list
))
{
if
(
!
empty
(
$sid
)
&&
array_key_exists
(
$sid
,
$this
->
sid_list
))
{
if
(
!
$response_plain
)
{
return
$this
->
sid_list
[
$sid
]
->
action
->
getNodeData
();
}
else
{
...
...
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