Advertisement:

Author Topic: GDPR Helper  (Read 13062 times)

Online m4z

  • Localization Team Apprentice
  • Jr. Member
  • **
  • Posts: 354
Re: GDPR Helper
« Reply #100 on: April 28, 2019, 03:54:47 PM »
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

Offline Massl

  • Jr. Member
  • **
  • Posts: 260
Re: GDPR Helper
« Reply #101 on: April 28, 2019, 04:46:35 PM »
Hi, with smf 2.1 RC2 I have many errors:
Code: [Select]
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"
« Last Edit: April 28, 2019, 05:13:26 PM by Massl »

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,846
    • StoryBB/StoryBB on GitHub
Re: GDPR Helper
« Reply #102 on: April 28, 2019, 05:25:24 PM »
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...
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Massl

  • Jr. Member
  • **
  • Posts: 260
Re: GDPR Helper
« Reply #103 on: April 29, 2019, 03:20:15 AM »
Hi, with smf 2.1 RC2 I have many errors:
Code: [Select]
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.

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,624
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: GDPR Helper
« Reply #104 on: April 29, 2019, 03:22:34 AM »
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

Offline Massl

  • Jr. Member
  • **
  • Posts: 260

Online m4z

  • Localization Team Apprentice
  • Jr. Member
  • **
  • Posts: 354
Re: GDPR Helper
« Reply #106 on: April 29, 2019, 09:56:53 AM »
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

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,624
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: GDPR Helper
« Reply #107 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
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

Offline Massl

  • Jr. Member
  • **
  • Posts: 260
Re: GDPR Helper
« Reply #108 on: May 12, 2019, 01:44:34 PM »
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

Online m4z

  • Localization Team Apprentice
  • Jr. Member
  • **
  • Posts: 354
Re: GDPR Helper
« Reply #109 on: May 21, 2019, 05:39:23 PM »
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

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,624
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: GDPR Helper
« Reply #110 on: May 21, 2019, 05:47:55 PM »
Code: [Select]
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

Online m4z

  • Localization Team Apprentice
  • Jr. Member
  • **
  • Posts: 354
Re: GDPR Helper
« Reply #111 on: May 21, 2019, 05:56:05 PM »
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

Online m4z

  • Localization Team Apprentice
  • Jr. Member
  • **
  • Posts: 354
Re: GDPR Helper
« Reply #112 on: September 08, 2019, 08:01:49 AM »
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?
Quote
webmaster@some-forum.my-domain.de

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

After installing GDPR Helper, you've now got a two-line footer:
Quote
SMF 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:
Quote
SMF 2.1 RC2 © 2019, Simple Machines    [...]    Help | Terms and Rules | Privacy Policy | Go Up ▲
« Last Edit: September 08, 2019, 08:26:25 AM by m4z »
"Faith is what you have in things that don't exist."
--Homer Simpson

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,624
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: GDPR Helper
« Reply #113 on: September 08, 2019, 10:33:19 AM »
#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

Online m4z

  • Localization Team Apprentice
  • Jr. Member
  • **
  • Posts: 354
Re: GDPR Helper
« Reply #114 on: September 08, 2019, 11:28:26 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...


#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:
Quote
Database 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

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 1,523
    • sbulen on GitHub
Re: GDPR Helper
« Reply #115 on: September 08, 2019, 12:33:22 PM »
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

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,846
    • StoryBB/StoryBB on GitHub
Re: GDPR Helper
« Reply #116 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)
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Online m4z

  • Localization Team Apprentice
  • Jr. Member
  • **
  • Posts: 354
Re: GDPR Helper
« Reply #117 on: September 08, 2019, 03:56:08 PM »
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

Online m4z

  • Localization Team Apprentice
  • Jr. Member
  • **
  • Posts: 354
Re: GDPR Helper
« Reply #118 on: September 08, 2019, 04:02:32 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

Offline moyack

  • Semi-Newbie
  • *
  • Posts: 58
  • Gender: Male
  • Bootstrap FTW!!
Re: GDPR Helper
« Reply #119 on: September 08, 2019, 10:16:42 PM »
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.