Post by straightlight » Wed Jul 16, 2014 7:29 pm

Package updated from the downloads tab. crsf.zip file.

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Guru Member

Posts

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

Post by straightlight » Mon Oct 23, 2017 1:07 am

An updated version for Opencart v3.x releases has been released in order to import the CSRF token in the TWIG file when using overrides / VQMod / OCMod. Instructions provided.

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Guru Member

Posts

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

Post by Evilonion » Fri Jan 05, 2018 12:00 am

hi

I've installed this module, can i ask what i do once i have enabled it and enabled logs?
Ive refreshed all cache files as well.

Is there something else to switch on for this captcha system to work?
I currently have google recaptcha v2 robot.

Active Member
Online

Posts

Joined
Sun Oct 30, 2016 8:07 pm

Post by straightlight » Fri Jan 05, 2018 5:44 am

Evilonion wrote:
Fri Jan 05, 2018 12:00 am
hi

I've installed this module, can i ask what i do once i have enabled it and enabled logs?
Ive refreshed all cache files as well.

Is there something else to switch on for this captcha system to work?
I currently have google recaptcha v2 robot.
No OC version posted. For documentation instructions, please read the guide on the marketplace where you downloaded the CSRF Form Protection. Full details are provided.

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Guru Member

Posts

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

Post by Evilonion » Fri Jan 05, 2018 8:13 am

sorry, opencart 3.0.2
I've enabled the installed and enabled the module i just didn't know if there was anything further that has to be done?
or is enabling it enough?

Active Member
Online

Posts

Joined
Sun Oct 30, 2016 8:07 pm

Post by straightlight » Sat Jan 06, 2018 6:24 am

Once enabled, you need to edit each of your TWIG files (preferably with VQMod) and add the following in their relative controllers and method name where HTML forms would be used from the TWIG files.

For instance, in the controllers,

Code: Select all

$csrf = new Csrf();

$csrf->csrf_start($this->registry);

$data['csrf_form_input'] = $csrf->csrf_form_input();
Then, in the relative TWIG files, where:

Code: Select all

<form ...
shows, add below each:

Code: Select all

{% if csrf_form_input %}
{{ csrf_form_input }}
{% endif %}
This is also useful for AJAX Requests and when using the API with Opencart.

The most generated errors being found on Opencart forum originates from contributed programming.

Regards,
Straightlight


Guru Member

Posts

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

Users browsing this forum: No registered users and 12 guests