News:

Wondering if this will always be free?  See why free is better.

Main Menu

GDPR Helper

Started by vbgamer45, June 02, 2018, 07:23:16 PM

Previous topic - Next topic

m4z

Quote from: vbgamer45 on April 18, 2019, 11:19:49 AM
I haven't tested any of my mods on PostgreSQL and at this point due to very few requests I can only think of about 2 or three times in 10 years not planned.

With a bit of monkeypatching (basically s/INSERT IGNORE/INSERT/g and s/REPLACE INTO/INSERT INTO/g) I got your mod to install on Postgres; are you interested in a PR?

Of course, as of yet, my version isn't safe to re-install because of my changes above. I wanted to go the route of deleting anything added by the mod from the DB in uninstall.php (but I first need to read a bit on mod development). Is this route reasonable to you, or would you prefer me trying to write up emulating functions for INSERT IGNORE and REPLACE INTO?
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

Massl

#101
Hi, with smf 2.1 RC2 I have many errors:
2: inet_ntop(): Invalid in_addr value
/home/public_html/Sources/Subs.php (Riga 5749)


They are created when viewing messages of a deleted user.

EDIT: I believe it is due to the conversion from mybb and it is not a problem of this mod, I see now that many poster_ip are "NULL"

Arantor

Quote from: m4z on April 28, 2019, 03:54:47 PM
Quote from: vbgamer45 on April 18, 2019, 11:19:49 AM
I haven't tested any of my mods on PostgreSQL and at this point due to very few requests I can only think of about 2 or three times in 10 years not planned.

With a bit of monkeypatching (basically s/INSERT IGNORE/INSERT/g and s/REPLACE INTO/INSERT INTO/g) I got your mod to install on Postgres; are you interested in a PR?

Of course, as of yet, my version isn't safe to re-install because of my changes above. I wanted to go the route of deleting anything added by the mod from the DB in uninstall.php (but I first need to read a bit on mod development). Is this route reasonable to you, or would you prefer me trying to write up emulating functions for INSERT IGNORE and REPLACE INTO?

$smcFunc['db_insert'] should already support both, if not there are bigger problems...

Massl

Quote from: Massl on April 28, 2019, 04:46:35 PM
Hi, with smf 2.1 RC2 I have many errors:
2: inet_ntop(): Invalid in_addr value
/home/public_html/Sources/Subs.php (Riga 5749)


They are created when viewing messages of a deleted user.

EDIT: I believe it is due to the conversion from mybb and it is not a problem of this mod, I see now that many poster_ip are "NULL"

The problem is this mod that sets to 127.0.0.1 poster_ip for all messages of the deleted users.

vbgamer45

strange i thought null would be more of an issue than 127.0.0.1
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro


m4z

Quote from: Arantor on April 28, 2019, 05:25:24 PM
Quote from: m4z on April 28, 2019, 03:54:47 PM
With a bit of monkeypatching (basically s/INSERT IGNORE/INSERT/g and s/REPLACE INTO/INSERT INTO/g) I got your mod to install on Postgres; are you interested in a PR?

Of course, as of yet, my version isn't safe to re-install because of my changes above. I wanted to go the route of deleting anything added by the mod from the DB in uninstall.php (but I first need to read a bit on mod development). Is this route reasonable to you, or would you prefer me trying to write up emulating functions for INSERT IGNORE and REPLACE INTO?

$smcFunc['db_insert'] should already support both, if not there are bigger problems...

Ah, it took me a moment to understand your point. The GDPR mod isn't using $smcFunc['db_insert'] for these DB interactions, but $smcFunc['db_query']. I don't know if that can be easily changed, but I'll look into that function later this week.
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

vbgamer45

It could be just requires minor changes. I do the other way for two reasons easier to move code to different platforms and just easier to view/modify
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Massl

Quote from: vbgamer45 on April 29, 2019, 03:22:34 AM
strange i thought null would be more of an issue than 127.0.0.1

Hi, do you know how I can fix it?
Thank you

m4z

I just found a huge problem (for my usecase): When guests aren't allowed to "browse the forum", they can't access the Privacy Policy.
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

vbgamer45

Edit /index.php

find
[code[
// If guest access is off, a guest can only do one of the very few following actions.
elseif (empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('coppa', 'login', 'login2', 'register', 'register2', 'reminder', 'activate', 'help', 'smstats', 'mailq', 'verificationcode', 'openidreturn'))))
{
require_once($sourcedir . '/Subs-Auth.php');
return 'KickGuest';
}


Add gdpr to the action array.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

m4z

Thanks for the lightning-speed response!

Adding "gdpr" has no effect, but "gpdr" works.  ::)
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

m4z

#112
GDPR Helper 1.0.5c on SMF 2.1rc2 (also applies to current Github HEAD):

1.) The mod attempts to create a link from the webmaster mail address in the Privacy Policy. In my case this fails to recognize I'm on a subdomain, and only the main domain part is (correctly) linked to itself; are subdomains skipped on purpose?
Quotewebmaster@some-forum.my-domain.de

2.) Vanilla SMF comes with a one-line footer:
QuoteSMF 2.1 RC2 © 2019, Simple Machines    [...]    Help | Terms and Rules | Go Up ▲

After installing GDPR Helper, you've now got a two-line footer:
QuoteSMF 2.1 RC2 © 2019, Simple Machines    [...]    Help | Terms and Rules | Go Up ▲
Privacy Policy

Could this be changed to be a one-liner instead? I'm thinking of something like this:
QuoteSMF 2.1 RC2 © 2019, Simple Machines    [...]    Help | Terms and Rules | Privacy Policy | Go Up ▲
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

vbgamer45

#1. It is based on $webmaster_email  from SMF under Server Settings

#2. Could be changed. Check the hooks file and edit the line for privacy policy.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

m4z

Quote from: vbgamer45 on September 08, 2019, 10:33:19 AM
#1. It is based on $webmaster_email  from SMF under Server Settings

Hmm, do I assume correctly that you're saying the link is added by vanilla SMF? The value of that variable is the plain mail address; gpdr.php/gpdr2.php just seems to str_replace the variable value into the page. I can't find how/where the link is added though...


Quote from: vbgamer45 on September 08, 2019, 10:33:19 AM
#2. Could be changed. Check the hooks file and edit the line for privacy policy.

Thanks for the pointer, will do.


Btw, when I try to uninstall, I get an incorrect header ("Uninstall Feedback for Login Security", might already have reported this on GH), plus:
QuoteDatabase Error
ERROR: duplicate key value violates unique constraint "alphasmf_settings_pkey"
DETAIL: Key (variable)=(downloads_smfversion) already exists.
File: /home/alpha-smf/public_html/Packages/temp/GDPRHelper1.0.5/dohooks.php
Line: 39

After that, the package seems to be partially uninstalled: the patched files from vanilla SMF seem to be patched still, but all files added by GDPR Helper are already uninstalled (AFAICT from the following attempt to uninstall the package). Is this another Postgres issue?
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

shawnb61

Quote from: vbgamer45 on April 30, 2019, 06:49:55 AM
It could be just requires minor changes. I do the other way for two reasons easier to move code to different platforms and just easier to view/modify

$smcFunc['db_insert'] must be used for pg support. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Arantor

The mod makes it fairly clear that PGSQL isn't supported (or at least, isn't tested and no compatibility is claimed, like 99% of all SMF mods it's simply never been tested on what has *always* been the second class citizen in 2.0)

m4z

Quote from: shawnb61 on September 08, 2019, 12:33:22 PM
Quote from: vbgamer45 on April 30, 2019, 06:49:55 AM
It could be just requires minor changes. I do the other way for two reasons easier to move code to different platforms and just easier to view/modify

$smcFunc['db_insert'] must be used for pg support.

Ah, thanks. I have it on my todo list to look into postgres compatibility, but I completely forgot about the db_insert/db_query detail.
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

m4z

Quote from: Arantor on September 08, 2019, 01:56:34 PM
The mod makes it fairly clear that PGSQL isn't supported (or at least, isn't tested and no compatibility is claimed, like 99% of all SMF mods it's simply never been tested on what has *always* been the second class citizen in 2.0)

We've had that discussion in this thread before. ;)
I have basic postgres support working for months (although apparently I never tried uninstalling) and nagged the author (vbgamer) here and on Github about getting this and other stuff merged, but it isn't anywhere near a PR (and even then IIRC the author said he had little interest in postgres support)...
"Faith is what you have in things that don't exist."
--Homer Simpson

Es gibt hier im Forum ein deutsches Support-Board!

moyack

Hi!!

I've just installed this mod and after setting the option of reagree the privacy policy, it block the site showing a blank page with the text "Numeric request keys are invalid." and the address is forced to this: https://wc3modding.info/gpdr/sa/privacypolicy/reagree/1/

Any help would be appreciated to solve this issue.

Advertisement: