<feed xmlns='http://www.w3.org/2005/Atom'>
<title>scrott/app/class/database.class.php, branch v0.2</title>
<subtitle>The Secure Centralized Robust Online Ticketing Tool</subtitle>
<link rel='alternate' type='text/html' href='http://normalmode.org/malf/scrott/'/>
<entry>
<title>database:  Fix bug in function checkConfig()</title>
<updated>2018-09-22T07:15:58+00:00</updated>
<author>
<name>Malf Furious</name>
<email>m@lfurio.us</email>
</author>
<published>2018-09-22T07:15:58+00:00</published>
<link rel='alternate' type='text/html' href='http://normalmode.org/malf/scrott/commit/?id=bc897063c822ee90fb23abf5189cc2b95e1a4f76'/>
<id>bc897063c822ee90fb23abf5189cc2b95e1a4f76</id>
<content type='text'>
Because of how this function was implemented, any failure during
database instance construction is treated the same way.  IE. we cannot
tell the difference between 'no db config' (as is the initial default
state) and a 'bad db config' (either bogus data, or the server happens
to be down).

Because of this, if, after the database access is initially set up,
access to the db becomes unavailable or someone makes a bad edit to the
dbconfig.php file, Scrott behaves as if it is being configured for the
first time.  This is *dangerous* behavior! (unexpected, at the least)

The implication of this is that if Scrott's database access is ever
incidentially interrupted, the very next visitor to the site is offered
the chance to (silently) reconfigure the server to point to any database
of his choosing.

This patch updates the checkConfig() function to only 'soft fail'
(return false) in the case where the configuration is _actually_
missing. IE. $_SCROTT['conf'] is not defined.  This function will
otherwise passthrough any and all exceptions which result from
instanciating the database instance and will only return true if both of
these steps succeed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because of how this function was implemented, any failure during
database instance construction is treated the same way.  IE. we cannot
tell the difference between 'no db config' (as is the initial default
state) and a 'bad db config' (either bogus data, or the server happens
to be down).

Because of this, if, after the database access is initially set up,
access to the db becomes unavailable or someone makes a bad edit to the
dbconfig.php file, Scrott behaves as if it is being configured for the
first time.  This is *dangerous* behavior! (unexpected, at the least)

The implication of this is that if Scrott's database access is ever
incidentially interrupted, the very next visitor to the site is offered
the chance to (silently) reconfigure the server to point to any database
of his choosing.

This patch updates the checkConfig() function to only 'soft fail'
(return false) in the case where the configuration is _actually_
missing. IE. $_SCROTT['conf'] is not defined.  This function will
otherwise passthrough any and all exceptions which result from
instanciating the database instance and will only return true if both of
these steps succeed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add function database::setConfig()</title>
<updated>2017-07-07T03:41:17+00:00</updated>
<author>
<name>Malf Furious</name>
<email>m@lfurio.us</email>
</author>
<published>2017-07-07T03:41:17+00:00</published>
<link rel='alternate' type='text/html' href='http://normalmode.org/malf/scrott/commit/?id=be0b63cae463f814aa7eef879c0994b8e3ca16ba'/>
<id>be0b63cae463f814aa7eef879c0994b8e3ca16ba</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add function database::checkConfig()</title>
<updated>2017-02-13T09:23:49+00:00</updated>
<author>
<name>Malf Furious</name>
<email>m@lfurio.us</email>
</author>
<published>2017-02-13T09:23:49+00:00</published>
<link rel='alternate' type='text/html' href='http://normalmode.org/malf/scrott/commit/?id=a4bdf800e224a64fc704b6d19b668287f030a3e8'/>
<id>a4bdf800e224a64fc704b6d19b668287f030a3e8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement function database::getInstance()</title>
<updated>2017-02-13T09:15:20+00:00</updated>
<author>
<name>Malf Furious</name>
<email>m@lfurio.us</email>
</author>
<published>2017-02-13T09:15:20+00:00</published>
<link rel='alternate' type='text/html' href='http://normalmode.org/malf/scrott/commit/?id=30fc005d7cea626184ee57f3dea88881ad6cf6fa'/>
<id>30fc005d7cea626184ee57f3dea88881ad6cf6fa</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Update database API</title>
<updated>2017-02-06T05:47:55+00:00</updated>
<author>
<name>Malf Furious</name>
<email>m@lfurio.us</email>
</author>
<published>2017-02-06T05:47:55+00:00</published>
<link rel='alternate' type='text/html' href='http://normalmode.org/malf/scrott/commit/?id=56a6dda13bb85b25f590fc8a64535bb53c3c2fd2'/>
<id>56a6dda13bb85b25f590fc8a64535bb53c3c2fd2</id>
<content type='text'>
The abstract functions of database have been made protected and their
names prefixed with '_'.  The database class has been given new static
functions query() and esc(), which call the _query() and _esc() function
from the database instance object.  This change was made to address the
use of db routines from static contexes.  Calls like
`database::get()-&gt;query()` which mix static and instance function access
operators, can now be `database::query()`, and all singleton is
abstracted away; the instance's destructor continues to close the db
connection.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The abstract functions of database have been made protected and their
names prefixed with '_'.  The database class has been given new static
functions query() and esc(), which call the _query() and _esc() function
from the database instance object.  This change was made to address the
use of db routines from static contexes.  Calls like
`database::get()-&gt;query()` which mix static and instance function access
operators, can now be `database::query()`, and all singleton is
abstracted away; the instance's destructor continues to close the db
connection.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add database class</title>
<updated>2017-01-15T02:11:31+00:00</updated>
<author>
<name>Malf Furious</name>
<email>m@lfurio.us</email>
</author>
<published>2017-01-15T02:11:31+00:00</published>
<link rel='alternate' type='text/html' href='http://normalmode.org/malf/scrott/commit/?id=a92f8af0f9aed383e4243e5b2b50d248e843cab4'/>
<id>a92f8af0f9aed383e4243e5b2b50d248e843cab4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Reset working directory for clean Scrott implementation</title>
<updated>2017-01-14T07:26:28+00:00</updated>
<author>
<name>Malf Furious</name>
<email>m@lfurio.us</email>
</author>
<published>2017-01-14T07:26:28+00:00</published>
<link rel='alternate' type='text/html' href='http://normalmode.org/malf/scrott/commit/?id=dae3964e7682dcd0d64075dfc28a23c12ef6c52e'/>
<id>dae3964e7682dcd0d64075dfc28a23c12ef6c52e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Partial commit of initObj function -- this class needs reworked again...</title>
<updated>2017-01-14T07:13:07+00:00</updated>
<author>
<name>Malf Furious</name>
<email>m@lfurio.us</email>
</author>
<published>2017-01-14T07:13:07+00:00</published>
<link rel='alternate' type='text/html' href='http://normalmode.org/malf/scrott/commit/?id=33499cb813d6aac2abc649dd8e42a3c97ce306b2'/>
<id>33499cb813d6aac2abc649dd8e42a3c97ce306b2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add mysql class</title>
<updated>2016-10-23T23:01:52+00:00</updated>
<author>
<name>Malf Furious</name>
<email>m@lfurio.us</email>
</author>
<published>2016-10-23T23:01:52+00:00</published>
<link rel='alternate' type='text/html' href='http://normalmode.org/malf/scrott/commit/?id=b6f82bb6552517d8bc442a2087c6c37a33bd18bd'/>
<id>b6f82bb6552517d8bc442a2087c6c37a33bd18bd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add database class</title>
<updated>2016-10-23T21:21:16+00:00</updated>
<author>
<name>Malf Furious</name>
<email>m@lfurio.us</email>
</author>
<published>2016-10-23T21:21:16+00:00</published>
<link rel='alternate' type='text/html' href='http://normalmode.org/malf/scrott/commit/?id=2e4dbf98b96adc8731c3101385e47e1f00c21d31'/>
<id>2e4dbf98b96adc8731c3101385e47e1f00c21d31</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
