Post by xxvirusxx » Sun May 31, 2020 11:20 pm

Auto-deleting expired sessions was fixed?

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by straightlight » Sun May 31, 2020 11:21 pm

straightlight wrote:
Sun May 31, 2020 11:17 pm
xxvirusxx wrote:
Sun May 31, 2020 11:14 pm
Filter value issue

https://github.com/opencart/opencart/pull/7832
Not a major but would indeed be more informative to the users ... :ponder:

Ok, fixed.
Reversed. Filters are a dynamic list where users do not have the obligations to fill them. Once all the filters being removed, users still have the right to remove all the filters from their stores.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Sun May 31, 2020 11:22 pm

xxvirusxx wrote:
Sun May 31, 2020 11:20 pm
Auto-deleting expired sessions was fixed?
Locations please!

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by straightlight » Sun May 31, 2020 11:26 pm

Denied. It stays to an hour interval as per the master branch.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ADD Creative » Sun May 31, 2020 11:35 pm

straightlight wrote:
Sun May 31, 2020 10:35 pm
First commit: Denied. No major incidents reported about those claims. Besides, too many extensions and could also affect local APIs being used. There are frequent posts regarding use of APIs and must not report additional issues. In addition, most of these instructions from Add Creative on this commit shows files that are no longer included in the master branch and even, nowadays, excluded from the pre-release. Security concerns have then been addressed accordingly by removing the extra files.
They were already added to the master branch and are not going to affect compatibility. Please take security seriously, just because some on the payment files are not longer there, should not be a reason for not patching core files. Let me know the branch on GitHub you are commiting all these changes to and I will do a simpler pull request minus the files that have been removed.
straightlight wrote:
Sun May 31, 2020 10:35 pm
Second commit: The master branch already contains a removal line of DIR_UPLOAD being replaced with html_entity_decode instead. Hard to know which one is right at this time. Will have to put that one on hold.
DIR_UPLOAD hasn't been replaced with html_entity_decode in the master branch. It's replace by DIR_STORAGE . 'backup/'. https://github.com/opencart/opencart/bl ... p.php#L225
It's the adding of basename that's important.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by xxvirusxx » Sun May 31, 2020 11:35 pm

straightlight wrote:
Sun May 31, 2020 11:21 pm
Reversed. Filters are a dynamic list where users do not have the obligations to fill them. Once all the filters being removed, users still have the right to remove all the filters from their stores.
That was to ignore saving filter without filter values
Why to save a filter without value?

Attachments

Screenshot_2020-05-31_18-32-16.png

Screenshot_2020-05-31_18-32-16.png (35.36 KiB) Viewed 24253 times


Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by straightlight » Sun May 31, 2020 11:40 pm

xxvirusxx wrote:
Sun May 31, 2020 11:35 pm
straightlight wrote:
Sun May 31, 2020 11:21 pm
Reversed. Filters are a dynamic list where users do not have the obligations to fill them. Once all the filters being removed, users still have the right to remove all the filters from their stores.
That was to ignore saving filter without filter values
Why to save a filter without value?
Because of the admin/model/catalog/filter.php file where it edits the filter:

Code: Select all

if (isset($data['filter'])) {
			foreach ($data['filter'] as $filter) {
				if ($filter['filter_id']) {
					$this->db->query("INSERT INTO " . DB_PREFIX . "filter SET filter_id = '" . (int)$filter['filter_id'] . "', filter_group_id = '" . (int)$filter_group_id . "', sort_order = '" . (int)$filter['sort_order'] . "'");
				} else {
					$this->db->query("INSERT INTO " . DB_PREFIX . "filter SET filter_group_id = '" . (int)$filter_group_id . "', sort_order = '" . (int)$filter['sort_order'] . "'");
				}

				$filter_id = $this->db->getLastId();

				foreach ($filter['filter_description'] as $language_id => $filter_description) {
					$this->db->query("INSERT INTO " . DB_PREFIX . "filter_description SET filter_id = '" . (int)$filter_id . "', language_id = '" . (int)$language_id . "', filter_group_id = '" . (int)$filter_group_id . "', `name` = '" . $this->db->escape($filter_description['name']) . "'");
				}
			}
		}
If there's a filter_id, it will keep the filter_id but if there isn't, the filter_group_id without the filter_id will be saved instead.

As you can see in this portion of the admin/view/template/catalog/filter_form.twig file:

Code: Select all

<td class="text-left" style="width: 70%;"><input type="hidden" name="filter[{{ filter_row }}][filter_id]"
The filter_id is a hidden field but won't be used if not being captured since the filter_group_id will rather be inserted.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by xxvirusxx » Sun May 31, 2020 11:42 pm

That's why need to be fixed...

Like Options :)

Attachments

Screenshot_2020-05-31_18-41-15.png

Screenshot_2020-05-31_18-41-15.png (30.56 KiB) Viewed 24239 times


Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by straightlight » Sun May 31, 2020 11:44 pm

xxvirusxx wrote:
Sun May 31, 2020 11:42 pm
That's why need to be fixed...

Like Options :)
So you mean that even when the list is empty, you'd still see this error message? If the case, I don't see the error sentence in the language definition.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by xxvirusxx » Sun May 31, 2020 11:45 pm

Filter can be saved without adding Filter values when should be a warning message: Warning: Filter values required!

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by straightlight » Sun May 31, 2020 11:46 pm

xxvirusxx wrote:
Sun May 31, 2020 11:45 pm
Filter can be saved without adding Filter values when should see a warning message: Warning: Filter values required!
This is what has been explained on the above, the filter_group_id is being used instead from the models, that's why.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by straightlight » Sun May 31, 2020 11:56 pm

xxvirusxx wrote:
Sun May 31, 2020 11:55 pm
Ok, ignore it.
Outstanding. Next case, next page and next request please!

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by straightlight » Mon Jun 01, 2020 12:33 am

xxvirusxx wrote:
Mon Jun 01, 2020 12:01 am
- getOrderRecurrings method

https://github.com/opencart/opencart/issues/6567
Fixed. However, added to different location in the same model. Also changed conventional name so not to conflict with the catalog/model/account/recurring.php's conventional name.

The method name will be: getOrderRecurring until the release gets reviewed for the new conventional names as renamed from the master branch recently.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ADD Creative » Mon Jun 01, 2020 3:44 am

straightlight wrote:
Sun May 31, 2020 11:26 pm
Denied. It stays to an hour interval as per the master branch.
The problem with session table bloating is not to do with the interval, but the fact that the garbage collection function gc() in never called. This means the session table just gets bigger and bigger with more entries. This causes two problems.

First is the the session table will eventually use up all the database storage and the site will start failing.

Second is that partly due to a bug in the session read query. There is a increased chance on very busy sites that the randomly generated session ID will be repeated and a customer will find themselves logged in as someone else.

Session read query bug is here.
https://github.com/opencart/opencart/pull/6613

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by straightlight » Mon Jun 01, 2020 4:06 am

ADD Creative wrote:
Mon Jun 01, 2020 3:44 am
straightlight wrote:
Sun May 31, 2020 11:26 pm
Denied. It stays to an hour interval as per the master branch.
The problem with session table bloating is not to do with the interval, but the fact that the garbage collection function gc() in never called. This means the session table just gets bigger and bigger with more entries. This causes two problems.

First is the the session table will eventually use up all the database storage and the site will start failing.

Second is that partly due to a bug in the session read query. There is a increased chance on very busy sites that the randomly generated session ID will be repeated and a customer will find themselves logged in as someone else.

Session read query bug is here.
https://github.com/opencart/opencart/pull/6613
Sorry, didn't see your post. Ok, it's been added.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Mon Jun 01, 2020 4:10 am

@Add Creative: #7973 has been added. Hope you are right on this one.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Mon Jun 01, 2020 4:15 am

@xxvirusxx: This post has been reversed in the pre-release: viewtopic.php?f=201&t=218203&start=60#p789070 . I have tried these modifications myself and causing mysqli fetch array issues and beginning to wonder if it's not this actual same issue why forum users keeps posting about. To be clear, no it's not the __destruct() and close() issue. The __destruct() method has been renamed accordingly as per the Github commit you provided on the topic but the close() connection can still be used. Even Stack Overflow believes to be a close() method issue from mysqli and I can definitely confirm now that it's NOT the case especially since I have reverted the change.

The new login mechanism is the issue and needs to be rectified on Github as it seem to affect the admin dashboard and other admin pages.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 3 guests