Git Product home page Git Product logo

base's People

Contributors

nathangibbs3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

base's Issues

BASE does not check for unset conf variables external_*_link before access.

Item Description
File: base_stat_ipaddr.php and base_local_rules.php
Class: N/A
Function: N/A
Similar Issues: https://github.com/NathanGibbs3/BASE/projects/2
Misc. Info.: It appears that the conf variables $external_dns_link & $external_all_link are not checked either.

Expected Behavior:
App checks the existence of the conf var via isset() before using it's value..
Current Behavior:
App does not check for unset conf variable external_whois_link.
This condition would occur if external_whois_link is not set in base_conf.php
This results in the following error(s) in production
PHP Notice: Undefined variable: external_whois_link in path redacted /base_stat_ipaddr.php on line 371

roleName() does not check for empty return value from DB.

File: includes/base_auth.inc.php
Class: BaseUser
Function: roleName()
Expected Behavior:
The return value should indicate that the role name is empty / does not exist.
Current Behavior:
Function does not check for an empty return from the DB.
This condition would occur if the role that a user belonged to was deleted.
This results in the following error in production
Uninitialized string offset: 0 in path redacted /includes/base_auth.inc.php on line 310
In the pages that would display a role name, nothing is displayed.

Invalid UTF-8 in some language files.

The following files in the language directory contain invalid UTF-8 characters.

languages/czech.lang.php
languages/danish.lang.php
languages/finnish.lang.php
languages/french.lang.php
languages/italian.lang.php
languages/norwegian.lang.php
languages/russian.lang.php
languages/swedish.lang.php
languages/turkish.lang.php

This was messing up code coverage report submissions.
We were getting "Malformed UTF-8 characters, possibly incorrectly encoded" errors.

Depends on: #11 Dependency Type: Soft

Sensor Name sort in base_stat_sensor.php crashes App.

Item Description
File(s): base_stat_sensor.php
Class: N/A
Function: M/A
Similar Issues: https://sourceforge.net/p/secureideas/bugs/244
Depends on Issue(s): N/A
Dependency Type: N/A
Misc. Info.: Sensor Name sort.

May be able to fix this by changing sensor.name to hostname.

  • Research historical schemas to ensure that we do not break backwards compatibility.

Expected Behavior:
Sort should execute.
Current Behavior:
Partial page display followed by error message.
Database ERROR:Database ERROR:Unknown column 'sensor.name' in 'order clause'

Support case sensitive usernames.

File: index.php
Expected Behavior:
Usernames should be case sensitive.
Current Behavior:
Usernames such as:
User
user
UsEr
are treated as the same user on login.

Safe Mode Breaks unit tests that need process isolation and don't preserve global state.

Link to example:
Build Environment: Travis-CI
PHP Version: 5.2x & 5.3x
PHPUnit Version: N/A
Other Info: Discovered while working #34 in the Issue11 branch #11 .

  • PHP 5.2x & PHPUnit 3x the -dsafe_mode=0 option "appears" to break process isolated tests with error message RuntimeException: sh: 1: /php: not found.
  • PHP 5.3x & PHPUnit 4x the -dsafe_mode=0 option isn't passed to process isolated tests, causing PHP 5.3x to throw E_DEPRECATED errors about Safe Mode.

Expected Behavior:
Tests run OK.
Current Behavior:
PHP Safe Mode Breaks unit tests that need process isolation and don't preserve global state.
Solution:
This may be fixable once we are able to complete Reevaluate Process isolation and error suppression in Unit Tests. in the Issue11 branch.
For the moment we will skip these tests on PHP < 5.4 when Safe Mode is enabled.

MultipleElementCriteria::PrintForm() PHP Notice: Uninitialized string/Undefined offset: 0

Item Description
File: includes/base_state_citems.inc.php
Class: MultipleElementCriteria
Function: PrintForm()
Related Issues: #5
Depends on Issue(s): #54
Dependency Type: Hard
Misc. Info.: These are instances where Issues #54 is not in play. Requesting the search function in the app causes this.

Expected Behavior: No error notices in logs.
Current Behavior: App is generating the above PHP Notices in logs.

Other Info: Related Files
base_qry_main.php
base_qry_form.php

BASE does not check for unset conf variable $colored_alerts before access.

Item Description
File: base_stat_alerts.php
Class: N/A
Function: N/A
Similar Issues: https://github.com/NathanGibbs3/BASE/projects/2
Depends on Issue(s):
Dependency Type:
Misc. Info.:

Expected Behavior:
App checks the existence of the conf var via isset() before using it's value.
Current Behavior:
App does not check for unset conf variable $colored_alerts.
This condition would occur if $colored_alerts is not set in base_conf.php
This results in the following error(s) in production
PHP Notice: Undefined variable: colored_alerts in path redacted base_stat_alerts.php

Make UI Language switchable at runtime.

Item Description
File: Translation files under languages
Class: N/A
Function: N/A
Similar Issues: https://sourceforge.net/p/secureideas/feature-requests/26/
Depends on Issue(s): #139
Dependency Type: Soft
Misc. Info.:

Expected Behavior:
Can switch at runtime.
This could be part of a user's preferences if auth system is enabled.
Current Behavior:
Language is hard coded into app configuration at setup.


First we need to switch the constants based multi language support into something variable based.

The advantages:

  • The ability to switch UI language at run time.
  • Unit Tests that validate the completeness of all translations.

Sub Tasks

User/Role Admin HTML styling hack, Re-implement via CSS.

Item Description
File: admin/base_roleadmin.php & admin/base_useradmin.php
Class: N/A
Function: N/A
Similar Issues: #25 #105 #110 #114
Depends on Issue(s): N/A
Dependency Type: N/A
Misc. Info.: CGI Action: list

Expected Behavior:
Same or similar visual results implemented via CSS.
Current Behavior:
The code produces an HTML styling hack, a nested table that visually appears as a single table with a black border 2px wide.

BASE does not check for unset conf variable $show_expanded_query before access.

Item Description
File: base_qry_form.php
Class: N/A
Function: N/A
Similar Issues: https://github.com/NathanGibbs3/BASE/projects/2
Depends on Issue(s):
Dependency Type:
Misc. Info.:

Expected Behavior:
App checks the existence of the conf var via isset() before using it's value..
Current Behavior:
App does not check for unset conf variable $show_expanded_query
This condition would occur if $show_expanded_query is not set in base_conf.php
This results in the following error(s) in production
PHP Notice: Undefined variable: show_expanded_query in path redacted base_qry_form.php on line 278

PHP Deprecated: Messages on Travis-CI & Local

Item Description
Link to example: https://travis-ci.com/NathanGibbs3/BASE/builds/103574382
Build Environment: Travis-CI & Local
PHP Version: 7.0.25, 7.1.11, 7.2.16, 7.3.2, 7.0.33-0+deb9u1 ( Local )
PHPUnit Version: 6.4.3, 6.4.3, 8.0.4, 8.0.2, 5.4.6 ( Local )
Similar Issues: #6 https://sourceforge.net/p/secureideas/bugs/141/
Depends on Issue(s):
Dependency Type:
Misc Info:
Runtime: PHP 7.0.25 with Xdebug 2.5.5
Runtime: PHP 7.1.11 with Xdebug 2.5.5
Runtime: PHP 7.2.16 with Xdebug 2.6.1
Runtime: PHP 7.3.2 with Xdebug 2.7.0rc1
Runtime: PHP 7.0.33-0+deb9u1 with Xdebug 2.5.0 ( Local )

Expected Behavior:
PHPUnit run without any warnings as described below.
Current Behavior:
Before running Unit tests, PHPUnit prints several lines like:
PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; baseCon has a deprecated constructor in /home/travis/build/NathanGibbs3/BASE/includes/base_db.inc.php on line 26
Solution:
Update the PHP Code responsible for causing this.

VerifyDBAbstractionLib() Not operative under safe mode.

Item Description
File: includes/base_db.inc.php
Class: N/A
Function: VerifyDBAbstractionLib()
Similar Issues:
Related Issues: https://sourceforge.net/p/secureideas/bugs/47
Depends on Issue(s):
Dependency Type: N/A
Misc. Info.: The safe mode cutout was added on 20050325. It may only be needed on PHP Versions below 5.1.5 as PHP 5.1x was released on 20051124. See https://www.php.net/manual/en/function.is-readable.php Will need to research this further.

Expected Behavior: VerifyDBAbstractionLib() is operative under safe mode where possible.
Current Behavior: VerifyDBAbstractionLib() function is not operative under safe mode.

Return value of function GetVendor

File: base_common.php
function GetVendor
Expected Behavior: return Vendor Name.
Current Behavior:
Returns the Vendor Name prefixed by a space character.
Found via new PHPUnit test.
Which is why testing is important.
Although this issue does not effect the usability of the software, it is a bug.

SignatureCriteria::PrintForm() does not check for unset conf variable $GLOBALS['use_sig_list'] before access.

Item Description
File: includes/base_state_citems.inc.php
Class: SignatureCriteria
Function: PrintForm
Similar Issues: #27 #31 #38 #40 #43
Depends on Issue(s):
Dependency Type:
Misc. Info.:

Expected Behavior:
App checks the existence of the conf var in the $GLOBALS array via in_array() before testing it's value..
Current Behavior:
Function does not check for unset conf variable $use_sig_list.
This condition would occur if $use_sig_list is not set in base_conf.php
his results in the following error(s) in production.
PHP Notice: Undefined index: use_sig_list in path redacted includes/base_state_citems.inc.php on line 459
This Issue was contributing to issue #5

QueryState::ExecuteOutputQuery() does not check for unset conf variable $show_rows before access.

Item Description
File: includes/base_state_query.inc.php
Class: QueryState
Function: ExecuteOutputQuery()
Similar Issues: https://github.com/NathanGibbs3/BASE/projects/2
Depends on Issue(s):
Dependency Type:
Misc. Info.: Only affects calls to the function that are not canned queries.

Expected Behavior:
App checks the existence of the conf var via isset() before using it's value.
Current Behavior:
App does not check for unset conf variable $show_rows.
This condition would occur if $show_rows is not set in base_conf.php
Malformed SQL is generated & the app exits with a database error.

BASE does not check for unset conf variable $show_previous_alert before access.

Item Description
File: base_stat_alerts.php
Class: N/A
Function: N/A
Similar Issues: https://github.com/NathanGibbs3/BASE/projects/2
Depends on Issue(s):
Dependency Type:
Misc. Info.:

Expected Behavior:
App checks the existence of the conf var via isset() before using it's value.
Current Behavior:
App does not check for unset conf variable $show_previous_alert
This condition would occur if $show_previous_alert is not set in base_conf.php
This results in the following error(s) in production
PHP Notice: Undefined variable: show_previous_alert in path redacted base_stat_alerts.php on line 163

CriteriaState::ReadState() does not check for unset conf variable $maintain_history before access.

Item Description
File: includes/base_state_criteria.inc.php
Class: CriteriaState
Function: ReadState()
Similar Issues: https://github.com/NathanGibbs3/BASE/projects/2

Expected Behavior:
App checks the existence of the conf var in the $GLOBALS array via in_array() before testing it's value..
Current Behavior:
Function does not check for unset conf variable $maintain_history.
This condition would occur if $maintain_history is not set in base_conf.php
This results in the following error(s) in production
PHP Notice: Undefined index: maintain_history in path redacted /includes/base_state_criteria.inc.php on line 93
PHP Notice: Undefined index: maintain_history in path redacted /includes/base_state_criteria.inc.php on line 124

PHP 5.2x on Travis-CI - Test run & Code coverage generation Issues.

Item Description
Related Issues:
Depends on Issue(s): #54 #10
Dependency Type: Hard

Link to example:
https://travis-ci.com/NathanGibbs3/BASE/jobs/183155000
Other Info:
Travis-CI
PHP 5.2.17
PHPUnit 3.6.12
XDebug enabled via file in Repo: https://github.com/NathanGibbs3/BASE/blob/devel/tests/5.2-xdebug.ini
To Understand how XDebug is enabled, see code in: https://github.com/NathanGibbs3/BASE/blob/devel/tests/setupenv.sh
Expected Behavior:
Code Coverage Reports are generated & tests run without warnings.
Current Behavior:
After successfully running Unit tests, PHPUnit prints:
Generating code coverage report in Clover XML format ...
Followed by a bunch of Warning & Notice Errors about the code such as:
Warning: include(../base_conf.php): failed to open stream: No such file or directory in /home/travis/build/NathanGibbs3/BASE/admin/base_roleadmin.php on line 21
Warning: include(): Failed opening '../base_conf.php' for inclusion (include_path='.:/home/travis/.phpenv/versions/5.2.17/pear') in /home/travis/build/NathanGibbs3/BASE/admin/base_roleadmin.php on line 21
Notice: Undefined variable: BASE_path in /home/travis/build/NathanGibbs3/BASE/admin/base_roleadmin.php on line 22
Notice: Use of undefined constant _SOURCE - assumed '_SOURCE' in /home/travis/build/NathanGibbs3/BASE/includes/base_state_citems.inc.php on line 953
etc.
Code Coverage Reports are not generated.
Solution:
I suspect this is a PHP 5.2 related Issue.
As I've already run into other issues with the PHP 5.2 Build environment on Travis-CI.

Inconsistent vendor names in base_mac_prefixes.map

File: base_mac_prefixes.map
Expected Behavior: Consistent vendor names.
Current Behavior: Examples
grep "Cisco" base_mac_prefixes.map | less
Returns the following

  • Cisco Systems, Inc.
  • Cisco Systems Inc.
  • Cisco Systems
  • Cisco

Grepping for "Hewlett Packard" returns similar results.
๐Ÿ™

Consider making roles active / inactive.

Adding the ability to disable / enable an entire role may be an idea for a future version.
This would allow finer grained access control without having to disable multiple users in a role.
Obviously, by design the Admin role could not be disabled.

Of course, right now BASE doesn't seem to lock out disabled users either.
See Issue #17

Add Anti XSS code to returnEditUser().

Item Description
File: includes/base_auth.inc.php
Class: BaseUser
Function: returnEditUser()
Similar Issues: #13 #32 #80
Misc. Info.:

Expected Behavior:
User Info from DB is passed through XSSPrintSafe() before being returned
Current Behavior:
Returned User info is not passed through XSSPrintSafe() immediately on retrieval from DB..

Add Anti XSS code to CGI Action "display" in base_user.php

Item Description
File: base_user.php
Class: N/A
CGI Action: display
Similar Issues: #13 #33
Misc. Info.: A possible solution may be to add the Anti XSS Code to BaseUser::returnEditUser(), that way, we could do this ASAP.

Expected Behavior:
User info from DB is passed through htmlspecialchars() before being returned.
Current Behavior:
Returned User information is not passed through htmlspecialchars() immediately on retrieval from DB..

Change ADODB download URL in error message.

Item Description
File: languages/*.lang.php
Class: N/A
Function: N/A
Similar Issues:
Depends on: #11
Dependency Type: Soft
Misc. Info.: TD Constant _ERRSQLDBALLOAD2

Expected Behavior:
Display the GitHub URL. for ADODB.
Current Behavior:
Displays the Sourceforge URL for ADODB

CVE-2012-1199

Description

Multiple PHP remote file inclusion vulnerabilities in Basic Analysis and Security Engine (BASE) 1.4.5 allow remote attackers to execute arbitrary PHP code.

  1. Via a URL in the BASE_path parameter to:
    1. base_ag_main.php
    2. base_db_setup.php
    3. base_graph_common.php
    4. base_graph_display.php
    5. base_graph_form.php
    6. base_graph_main.php
    7. base_local_rules.php
    8. base_logout.php
    9. base_main.php
    10. base_maintenance.php
    11. base_payload.php
    12. base_qry_alert.php
    13. base_qry_common.php
    14. base_qry_main.php
    15. base_stat_alerts.php
    16. base_stat_class.php
    17. base_stat_common.php
    18. base_stat_ipaddr.php
    19. base_stat_iplink.php
    20. base_stat_ports.php
    21. base_stat_sensor.php
    22. base_stat_time.php
    23. base_stat_uaddr.php
    24. base_user.php
    25. index.php
    26. admin/base_roleadmin.php
    27. admin/base_useradmin.php
    28. admin/index.php
    29. help/base_setup_help.php
    30. includes/base_action.inc.php
    31. includes/base_cache.inc.php
    32. includes/base_db.inc.php
    33. includes/base_db.inc.php
    34. includes/base_include.inc.php
    35. includes/base_output_html.inc.php
    36. includes/base_output_query.inc.php
    37. includes/base_state_criteria.inc.php
    38. includes/base_state_query.inc.php
    39. setup/base_conf_contents.php
  2. GLOBALS[user_session_path] parameter to includes/base_state_common.inc.php
  3. BASE_Language parameter to setup/base_conf_contents.php
  4. ado_inc_php parameter to setup/setup2.php
    https://nvd.nist.gov/vuln/detail/CVE-2012-1199

Alert Selection Bug - Sig criteria ignored when viewing results by port.

When:

  • We are viewing alerts matching a signature.
  • We have the results displayed by port criteria..

Selecting a result and executing a Delete Selected, deletes every alert in the DB matching the port criteria regardless of the signature.

Example:

  • All alerts in DB matching TCP dest port 44055 = 2966
  • All alerts in DB matching UDP dest port 44055 = 1501
  • All alerts in DB matching TCP or UDP dest port 44055 = 4467

Actions:

  1. Select signature containing 203 alerts.
  2. Display results by dest port.
  3. Select 1 result item containing 95 alerts.
  4. Execute a Delete Selected.

Result: 4467 Alerts deleted.

Definitely not what was expected, as we are expecting 95 alerts to be deleted.

I have run into this bug in the past, and wondered why BASE would randomly delete large swathes of my alert DB. Now I know why, as my criteria usually involved port criteria. ๐Ÿ˜„


Related Info: https://sourceforge.net/p/secureideas/discussion/404428/thread/87b62ba7/
Potentially related Issue from the legacy BASE Ticketing System on Sourceforge.net
https://sourceforge.net/p/secureideas/bugs/188/

Add Anti XSS code to returnRoleNamesDropDown()

Item Description
File: includes/base_auth.inc.php
Class: BaseUser
Function: returnRoleNamesDropDown()
Line(s): 325
Similar Issues: #32 #33

Expected Behavior:
Values from DB are passed through htmlspecialchars() before being returned in HTML string.
Current Behavior:
Option names in returned HTML are not passed through htmlspecialchars() immediately on retrieval from DB..

PHP Strict standards/Warning: Declaration Messages on Travis-CI & Local

Item Description
Link to example: https://travis-ci.com/NathanGibbs3/BASE/builds/103574382
Build Environment: Travis-CI
PHP Version: 5.4.45, 5.5.38, 5.6.32, 8.0.0-dev ( Nightly build as of 2019-03-07 )
PHPUnit Version: 4.8.35, 4.8.36, 5.7.23, 8.0.2
Similar Issues: #7 https://sourceforge.net/p/secureideas/bugs/141/
Depends on Issue(s):
Dependency Type:
Misc Info:
Runtime: PHP 5.4.45 with Xdebug 2.4.1
Runtime: PHP 5.5.38 with Xdebug 2.4.1
Runtime: PHP 5.6.32 with Xdebug 2.5.5
Runtime: PHP 8.0.0-dev

Expected Behavior:
PHPUnit run without any warnings as described below.
Current Behavior:
Before running Unit tests, PHPUnit prints several lines like:
PHP Strict standards: Declaration of MultipleElementCriteria::SanitizeElement() should be compatible with BaseCriteria::SanitizeElement() in /home/travis/build/NathanGibbs3/BASE/includes/base_state_citems.inc.php on line 292
Travis-CI PHP Nightly build & Local build environment issues PHP Warning: instead of PHP Strict standards:
Solution:
Update the PHP Code responsible for causing this.

CVE-2012-1198

Description

base_ag_main.php in Basic Analysis and Security Engine (BASE) 1.4.5 allows remote attackers to execute arbitrary code by uploading contents of the file with an executable extension via a create action, then accessing it via a view action.
https://nvd.nist.gov/vuln/detail/CVE-2012-1198

Function DateTimeRows2sql PHP Notice: Undefined index: mysqli

File: base_qry_common.php
Function: DateTimeRows2sql
Line: 179

$t = $t . $time_field[$db->DB_type] . $minsec[$op] . $time_field[$db->DB_type] . $minsec[$op];

Other Info:
Issue is a side effect of commit acfbae4
Specifically:
$type = "mysqli";

Expected Behavior: No error notices in logs.
Current Behavior:
App is generating the following PHP Notice in logs.
PHP Notice: Undefined index: mysqli path redacted base_qry_common.php on line 179

Solution: Expand array at this location

$time_field = array("mysql" => ":",

Image_Graph not working on PHP 7x

Item Description
File: base_graph_display.php
Class: N/A
Function: N/A
Similar Issues: Might be related to https://sourceforge.net/p/secureideas/patches/27/
Depends on Issue(s): #87
Dependency Type: Hard
Misc. Info.: Observed PHP Errors. PHP Parse error: syntax error, unexpected 'new' (T_NEW) in redacted base_graph_display.php on line 117 PHP Notice: Only variables should be passed or assigned by reference in redacted base_graph_display.php on line * Related to legacy code.

Expected Behavior:
Graphing should work.
Current Behavior:
Graphing doesn't work.

CVE-2012-1017

Description

Multiple SQL injection vulnerabilities in base_qry_main.php in Basic Analysis and Security Engine (BASE) 1.4.5 allow remote attackers to execute arbitrary SQL commands via the (1) ip_addr[0][1], (2) ip_addr[0][2], or (3) ip_addr[0][9] parameters.
https://nvd.nist.gov/vuln/detail/CVE-2012-1017

BASE does not check for unset variables in admin pages before access.

Item Description
File(s): admin/base_roleadmin.php & admin/base_useradmin.php
Class: N/A
Function: N/A
Similar Issues: #26 #27 #31 #40 #43
Depends on Issue(s): N/A
Dependency Type: N/A
Misc. Info.:

Expected Behavior:
App checks for variable existence via isset() before using it's value..
Current Behavior:
App does not check for unset Superglobal variable $_GET['action'] and script variable $pagebody. This was contributing to Issue #5.

PHP Deprecated: Function split() Build errors on PHP 5.3x & Postgresql

Link to example(s): Still Present (devel)
First Seen: https://travis-ci.org/NathanGibbs3/BASE/jobs/537072810
Latest Build: https://travis-ci.org/NathanGibbs3/BASE/jobs/537161088
Link to example(s): Not Present ( Issue11 )
Build Environment: Travis-CI
PHP Version: 5.3x
PHPUnit Version: N/A
Other Info: PostgreSQL DB with ADODB 4.94 on branches devel & master.
Revealed via new Unit Tests related to the Issue #13 fix.
When merged into Issue11 branch, build errors not present.


Expected Behavior:
Builds complete without warnings.
Current Behavior:
Builds Issuing deprecated function warnings
Solution: Upgrade min ADODB Version tested on PHP 5.3x

Search Criteria HTML styling hack, Re-implement via CSS.

Item Description
File: base_qry_common.php
Class: N/A
Function: PrintCriteria()
Similar Issues: #19 #105 #110 #114
Depends on Issue(s): N/A
Dependency Type: N/A
Misc. Info.: CGI Action: list

Expected Behavior:
Same or similar visual results implemented via CSS.
Current Behavior:
Like #19 , the code produces an HTML styling hack, a nested table that visually appears as a single table with a black border 2px wide.
Inside this, the code produces a similar hack, a table with a grey bgcolor="#DDDDDD" border 1px wide.
The search criteria table appears as if in a single frame with a black border and grey cell padding.
๐Ÿ‘ for visual creativity. ๐Ÿ‘Ž for code clarity & maintainability. โ˜น๏ธ

PrintFreshPage() does not check for unset Superglobal variable $_SERVER['REQUEST_URI'] before access.

Item Description
File: includes/base_output_html.inc.php
Class: N/A
Function: PrintFreshPage()
Similar Issues: #26 #27 #31 #38 #43
Depends on Issue(s): N/A
Dependency Type: N/A
Misc. Info.: Specific functions does not exist in Issue11 branch, but this issue does.

Expected Behavior:
App checks for variable existence via isset() before using it's value.
Current Behavior:
App does not check for unset Superglobal variable $_SERVER['REQUEST_URI'].
This was contributing to Issue #5.

Use EventTiming class where page load timing info is displayed.

Item Description
File: Code base at large.
Class: EventTiming
Function: N/A
Related Issues: #73
Similar Issues:
Depends on Issue(s): #11 #73 #78
Dependency Type: Soft Hard Hard
Misc. Info.:

Expected Behavior: EventTiming class is used anywhere page load timing information is displayed.
Current Behavior: EventTiming is used piecemeal through out the code base.
Things to fix::

  • Never called, but equivalent code is used without the benefit of language translation data.
  • Initialized before necessary authentication checks are done.
    We may not stay on the current page, but be redirected to a new page that initializes a separate event timing instance.
  • Initialized and never used.

REALLY, SERIOUSLY!!! โ—๐Ÿ˜ž

BASE does not check for unset conf variable $show_first_last_links before access.

Item Description
File: base_stat_alerts.php
Class: N/A
Function: N/A
Similar Issues: https://github.com/NathanGibbs3/BASE/projects/2
Depends on Issue(s):
Dependency Type:
Misc. Info.:

Expected Behavior:
App checks the existence of the conf var via isset() before using it's value.
Current Behavior:
App does not check for unset conf variable $show_first_last_links.
This condition would occur if show_first_last_links is not set in base_conf.php
This results in the following error(s) in production
PHP Notice: Undefined variable: show_first_last_links in path redacted base_stat_alerts.php

BuildSigLookup() does not check for unset conf variable external_sig_link before access.

Item Description
File: includes/base_signature.inc.php
Class: N/A
Function: BuildSigLookup()
Similar Issues: https://github.com/NathanGibbs3/BASE/projects/2
Misc. Info.: Error only happens when parameter $style=1, for HTML output.

Expected Behavior:
App checks the existence of the conf var in the $GLOBALS array via in_array() before testing it's value..
Current Behavior:
Function does not check for unset conf variable external_sig_link.
This condition would occur if external_sig_link is not set in base_conf.php
This results in the following error(s) in production
PHP Notice: Undefined index: external_sig_link in path redacted /includes/base_signature.inc.php on line 439
PHP Notice: Undefined index: external_sig_link in path redacted /includes/base_signature.inc.php on line 449
PHP Notice: Undefined index: external_sig_link in path redacted /includes/base_signature.inc.php on line 459

BASE does not check for unset conf variable $show_summary_stats before access.

Item Description
File: base_stat_alerts.php
Class: N/A
Function: N/A
Similar Issues: https://github.com/NathanGibbs3/BASE/projects/2
Depends on Issue(s):
Dependency Type:
Misc. Info.:

Expected Behavior:
App checks the existence of the conf var via isset() before using it's value.
Current Behavior:
App does not check for unset conf variable $show_summary_stats
This condition would occur if $show_summary_stats is not set in base_conf.php
This results in the following error(s) in production
PHP Notice: Undefined variable: show_summary_stats in path redacted base_stat_alerts.php on line 80

Add Anti CSRF Tokens to User/Role creation & editing code paths.

File(s):
admin/base_roleadmin.php
admin/base_useradmin.php
Between CGI Action create and CGI Action add.
Between CGI Action edit user/role and CGI Action update user/role.
Expected Behavior:
Anti CSRF tokens implemented.
Current Behavior:
No Anti CSRF tokens are currently implemented in these code paths.

This leaves the app vulnerable to CSRF based user/role creation & editing.

Cookie security improvements.

Item Description
File:
Class:
Function:
Similar Issues:
Depends on Issue(s):
Dependency Type:
Misc. Info.: Verify that cookies are sent with the appropriate options for domain path httponly samesite and maybe secure if we can determine if we are on an HTTPS transport. Also set appropriate timeouts.

Progress:

  • domain
  • path
  • httponly
  • samesite
  • secure
  • timeouts.

Expected Behavior: Cookies are sent with the appropriate options set.

Field BASEROLE Archive asciiclean Project Policy
Expires 1 hour 2 weeks Security: 1 hour, UX: 2 weeks
Path Set Set \ or $BASE_urlpath, determined by BASE at runtime.
Domain Set Set PHP default or $domain, determined by BASE at runtime.
Secure Set Set Set if possible, determined by BASE at runtime.
HttpOnly Set Set YES
SameSite Set Set Strict

Current Behavior:

Field BASEROLE Archive asciiclean
Expires None None None
Path PHP Default PHP Default PHP Default
Domain PHP Default PHP Default PHP Default
Secure No No No
HttpOnly No No No
SameSite Unset Defaults to None Unset Defaults to None Unset Defaults to None

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.