Deliverable 2 requires an external database for adding security to user's information as well as group's information.
prana2017-03-17 11:45
Hi Professor,
I tried adding different functions(initializeSqlPrivate & createDatabaseTablesPrivate) for private db. Also added different handles for db class (private_db_class, private_dbinfo). But itβs still creating an empty default2.db. On the other hand, new table(TYPE_KEYS) actually gets added to default.db instead of default2.db. So some how, itβs not able to separate two different database objects.
Could you please have a look at my patch and let me know if you get any hints about what I may have done wrong.
Thanks,
Pragya
administrator2017-03-17 22:40
Hey Pragya,
I'll try to look at this tomorrow and see if I can figure out the problem.
Best,
Chris
administrator2017-03-19 10:08
Hi Pragya,
For the sqlite code above you have the two lines:
+ $private_db = new $private_db_class();
+ $private_db->connect();
You can't use the version of connect without arguments for sqlite for the private database. This will connect you to the same database as the non-private one.
Use something like:
$private_db->connect(PRIVATE_DB_HOST, PRIVATE_DB_USER, PRIVATE_DB_PASSWORD, PRIVATE_DB_NAME);
whenever you want to connect to the private database.
Best,
Chris
prana2017-03-21 16:23
Hi Professor,
It worked after passing parameters to private_db->connect().
Thanks for the help!
Pragya
prana2017-04-03 14:50
Hi Professor,
Uploading new patch.
Main changes:
Added an external db
Added AES algorithm for encryption/decryption
When adding a new thread/comment in a group, encrypt each thread's Title & Description fields in the db.
When retrieving each thread's Title & Description from the db, decrypt using corresponding group's key from external db
Existing Issue:
Encryption/decryption steps have been excluded for two groups (Public & Wiki). It was giving error because the threads in these groups are created during CreateDB session. Need more time to debug it more.
prana2017-04-10 23:43
Hi Professor,
Uploading new patch with additional changes:
Updated table 'Groups' with new column 'encryption'.
Added a field 'Encryption' in the UI when creating a new group. This gives
an option to whether enable or disable encryption for the new group.
The only thing left is updating VersionFunctions.php for new database & 'Groups' table in existing db with new field 'Encryption'.
Deliverable 2 requires an external database for adding security to user's information as well as group's information.
Hi Professor,
I tried adding different functions(initializeSqlPrivate & createDatabaseTablesPrivate) for private db. Also added different handles for db class (private_db_class, private_dbinfo). But itβs still creating an empty default2.db. On the other hand, new table(TYPE_KEYS) actually gets added to default.db instead of default2.db. So some how, itβs not able to separate two different database objects.
Could you please have a look at my patch and let me know if you get any hints about what I may have done wrong.
Thanks, Pragya
Hey Pragya,
I'll try to look at this tomorrow and see if I can figure out the problem.
Best, Chris
Hi Pragya,
For the sqlite code above you have the two lines: + $private_db = new $private_db_class(); + $private_db->connect(); You can't use the version of connect without arguments for sqlite for the private database. This will connect you to the same database as the non-private one. Use something like: $private_db->connect(PRIVATE_DB_HOST, PRIVATE_DB_USER, PRIVATE_DB_PASSWORD, PRIVATE_DB_NAME); whenever you want to connect to the private database.
Best, Chris
Hi Professor,
It worked after passing parameters to private_db->connect(). Thanks for the help!
Pragya
Hi Professor,
Uploading new patch.
Main changes:
Existing Issue:
Hi Professor,
Uploading new patch with additional changes:
The only thing left is updating VersionFunctions.php for new database & 'Groups' table in existing db with new field 'Encryption'.
Pragya
Hi Professor,
Uploading a new patch with some fixes:
Pragya
Hi Professor, Uploading new patch with minor changes:
Pragya
Hey Pragya,
Thanks your patch, it was applied with 0563d63.
Best, Chris
Attachments:
298Del2_V2.patch
298Del2V3.patch
298Del2_V4.patch
298Del2_V5.patch
298Del2_V6.patch