View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001449 | Main CAcert Website | source code | public | 2018-11-11 19:02 | 2021-05-31 12:27 |
Reporter | bdmc | Assigned To | bdmc | ||
Priority | high | Severity | feature | Reproducibility | always |
Status | needs work | Resolution | open | ||
Summary | 0001449: Move configuration from code to external file | ||||
Description | Extract items that control operation of CAcert web site from source code into a file external to the web site. As Peter M. suggested, I am creating a file to contain a set of PHP define statements. These defines will allow changes to the operation of the web site. | ||||
Tags | No tags attached. | ||||
Reviewed by | |||||
Test Instructions | |||||
|
Here is a crude implementation of a configuration file. It should be named "config.php" and placed in the directory above "www" in the CAcert web site source tree. <?php /* LibreSSL - CAcert web application Copyright (C) 2004-2018 CAcert Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ define("PROD_STATE", "prod"); define['MCONN_HOST', "127.0.0.1"); define['MCONN_USER', "username"); define['MCONN_PASS', "password"); define('NORMALHOSTNAME', "www.cacert.org" ); define('SECUREHOSTNAME', "secure.cacert.org" ); define('TVERIFY', "tverify.cacert.org" ); define('TEST_EMAIL_TO', "brianmccullough@cacert.org"); |
|
I don't think, this bug blocks bug 1260 |
|
I'm sorry. I don't understand. This bug is a child of bug 1260, and is intended to contribute to its correction. |
|
I agree GuKK that this issue is a nice-to have. It is not needed for the migration to the new PHP version, in fact, it is quite independent from it. Seperating code from configuration information is preferred from a theoretical (or call it "aestethic") point of view, but the code as it is now will not pose any problems on PHP 7, or am I overlooking something? IMHO your proposal also does not really improve the situation, since it is still implemented as a PHP file, which may be looked on as "code". If I understood Jan correctly, he'd prefer to have a plain text file to hold configuration information, like an *.INI file used on windows. And this is how I also think about this topic. So I'd propose to remove the dependency on 0001260, and maybe lower the priority of this issue. |
|
The solution shown here was intended as an interim change that was only part way toward the "correct" solution. It is expected to be replaced with an INI-file solution, but is a way to begin to remove sensitive information from the regular source tree. The config.php file was not expected to be added to the source code stored in the repository. |
|
I have created a VM for myself to allow me to test code, in particular this, and have made progress with a proper Config class. More news to come. |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-11-11 19:02 | bdmc | New Issue | |
2018-11-11 19:02 | bdmc | Assigned To | => bdmc |
2018-11-11 19:19 | bdmc | Relationship added | child of 0001260 |
2018-11-14 03:39 | bdmc | Status | new => needs review & testing |
2018-11-14 03:40 | bdmc | Note Added: 0005667 | |
2018-11-14 14:02 | GuKKDevel | Note Added: 0005668 | |
2018-11-14 16:19 | GuKKDevel | Severity | major => feature |
2018-11-14 17:59 | bdmc | Note Added: 0005672 | |
2018-11-15 20:39 | Ted | Note Added: 0005676 | |
2018-11-15 23:58 | bdmc | Note Added: 0005679 | |
2018-11-16 10:54 | GuKKDevel | Relationship added | related to 0001445 |
2018-11-16 10:55 | GuKKDevel | Relationship deleted | child of 0001260 |
2018-11-16 10:55 | GuKKDevel | Relationship replaced | duplicate of 0001445 |
2018-11-26 03:53 | bdmc | Status | needs review & testing => needs work |
2019-01-02 06:16 | bdmc | Note Added: 0005722 | |
2021-05-31 12:27 | bdmc | Relationship added | related to 0001260 |