Textpattern CMS support forum

You are not logged in. Register | Login | Help

#91 2017-10-25 12:31:19

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,102

Re: smd_access_keys: secure, limited access to content

Thanks for the detailed reflections, Stef. I had such a gut feeling about these plans. And the more complicated such a mechanism is, the more complicated is making it waterproof and testing all cases. Not suited for the current budget.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#92 2018-01-31 18:22:37

giampablo
Member
From: Italy
Registered: 2008-07-17
Posts: 86
Website

Re: smd_access_keys: secure, limited access to content

Hi Stef,

Can you make smd_access_keys 4.7 compatible?
I started developing a site with 4.7-dev before finding out your plugin is needed…
Thanks a lot

P.S. Out of topic, 4.7-dev is actually very stable, as far as I can tell

Offline

#93 2018-01-31 18:52:18

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,310
Website

Re: smd_access_keys: secure, limited access to content

Does this beta not work? Must admit I’ve not tried it. Depending on your PHP version (e.g. 7+), you might get an error about mysql functions being removed. If so, the commit after the release I linked to fixes that.

If the plugin on the whole works okay, then I can roll out another beta with that fix in it. But if it’s totally broken on 4.7.0 then let me know what (specifically) isn’t working and I’ll get it sorted.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#94 2018-02-01 10:20:21

giampablo
Member
From: Italy
Registered: 2008-07-17
Posts: 86
Website

Re: smd_access_keys: secure, limited access to content

Thank you. The beta seems ok (not throwing errors now, as with version 0.11 previously used).
But, on local environment, the generated key is not working.
Maybe it’s my fault, or the URL page in Italian, or MAMP environment is the problem. I will investigate and let you know. I used:
http:localhost:8888/my_site_name/categoria/file/category_name/my_trigger/55b11.......

and this is Italian text pack:

#@smd_akey
#@language it
smd_akey => Chiavi di accesso
smd_akey_accesses => Tentativi di accesso
smd_akey_btn_new => Nuova chiave
smd_akey_btn_pref => Preferenze
smd_akey_deleted => Chiavi eliminate: {deleted}
smd_akey_err_bad_token => Chiavi mancanti o deteriorate
smd_akey_err_expired => Accesso scaduto
smd_akey_err_forbidden => Accesso vietato
smd_akey_err_invalid_token => Chiave di accesso non valida
smd_akey_err_limit => Limite di accesso raggiunto
smd_akey_err_missing_timestamp => Timestamp mancante
smd_akey_err_unauthorized => Accesso non autorizzato
smd_akey_err_unavailable => Non disponibile
smd_akey_file_download_expires => Scadenza File download (in secondi)
smd_akey_generated => Chiave di accesso: {key}
smd_akey_log_ip => Registro indirizzi IP
smd_akey_max => Massimo
smd_akey_need_page => Devi inserire un URL di pagina
smd_akey_page => Pagina
smd_akey_prefs_saved => Preferenze salvate
smd_akey_prefs_some_explain => Questa è o una nuova installazione o una versione<br />del plugin diversa da quella che avevi prima.
smd_akey_prefs_some_opts => Clicca “Installa tabella” per aggiungere o aggiornare la tabella<br />lasciando intatti tutti i dati esistenti.
smd_akey_prefs_some_tbl => Info tabella non tutte disponibili.
smd_akey_pref_legend => Preferenze chiavi di accesso
smd_akey_salt_length => lunghezza salt (in caratteri)
smd_akey_tab_name => Chiavi di accesso
smd_akey_tbl_installed => Tabella installata
smd_akey_tbl_install_lbl => Installazione tabella
smd_akey_tbl_not_installed => Tabella non installata
smd_akey_tbl_not_removed => Tabella non rimossa
smd_akey_tbl_removed => Tabella rimossa
smd_akey_time => Emessa
smd_akey_trigger => Trigger

Offline

#95 2018-02-01 10:30:52

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,310
Website

Re: smd_access_keys: secure, limited access to content

Thanks for the Italian pack, I’ve added it to the plugin code.

The fact you’re using a different language shouldn’t affect the plugin – it’s just a URL – and localhost should work too (for the same reason). But I’ve not really given the plugin a grilling in either case. Any info you can supply on the results would be most helpful, thank you.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#96 2018-03-01 11:31:56

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 3,793
Website

Re: smd_access_keys: secure, limited access to content

Rediscovering the fact this plugin existed. Bloke’s menagerie is a half-buried treasure chest. Or half revealed by the tides, maybe. I shall be rich from this one!1 Or tarred and feathered. Will look forward to the non-beta, which is when I’ll be ready for it anyway.

***

  1. a One does not simply walk in and get rich.” — Boromir

Fewer humans and more trees.

Offline

#97 2018-04-13 15:01:55

giampablo
Member
From: Italy
Registered: 2008-07-17
Posts: 86
Website

Re: smd_access_keys: secure, limited access to content

Hi Stef,

With 4.7.0 beta 3 the generated key does not work, yet:

<txp:if_category type="file">
   <txp:smd_access_protect trigger="course-files" force="1">
      <h3><txp:category title="1" /> downloads</h3>
      <txp:file_download_list category='<txp:category />' limit="50" />
   <txp:else />
      <p>No access to this resource, sorry.</p>
   </txp:smd_access_protect>
</txp:if_category>

this is the key:
http://localhost/test-4.7.0beta3/categoria/file/trekking/course-files/fa64921165b4181278ef24af5eb31ae11dc8ad2a/5ad0b886

Changing prefs with lower salt length or different trigger, I always get the <txp:else /> part (No access to this resource).

Sorry for not giving you further details, the plugin does not seem broken (other than minor visual css).

Can you test smd_access_key ver 0.20 beta, please ?
Thank you

Last edited by giampablo (2018-04-13 15:04:13)

Offline

#98 2018-04-16 14:03:18

giampablo
Member
From: Italy
Registered: 2008-07-17
Posts: 86
Website

Re: smd_access_keys: secure, limited access to content

Just for completeness, in debug mode this is the error notice:

Tag error: <txp:smd_access_protect trigger="a" force="1">
      <h3><txp:category title="1" /> downloads</h3>
      <txp:file_download_list category='<txp:category />' limit="50" />
  <txp:else />
      <p>No access to this resource, sorry.</p>
   </txp:smd_access_protect> ->  Textpattern Notice: tag is not registered while parsing form Nessuno on page default

Thanks for your support

Offline

#99 2018-04-16 19:01:14

jakob
Moderator
From: Germany
Registered: 2005-01-20
Posts: 2,926
Website

Re: smd_access_keys: secure, limited access to content

giampablo wrote #311068:

Textpattern Notice: tag is not registered while parsing form …

That’s just a notice and shouldn’t actually affect how the plugin works. A registry of permitted tags was introduced a while back and it’s just letting you know that it’s not there.

Insert the following into the plugin code at about this line (i.e. just before the functions for plugin tags)

if (class_exists('\Textpattern\Tag\Registry')) {
        Txp::get('\Textpattern\Tag\Registry')
            ->register('smd_access_key')
            ->register('smd_if_access_error')
            ->register('smd_access_error')
            ->register('smd_access_info')
            ->register('smd_access_protect')
            ;
}

That should resolve that error, but I’m not sure that it will help with your other problem.


TXP Builders – finely-crafted code, design and txp

Offline

#100 2018-04-17 12:57:47

giampablo
Member
From: Italy
Registered: 2008-07-17
Posts: 86
Website

Re: smd_access_keys: secure, limited access to content

Thanks Jacob,
unfortunately the problem is elsewhere.
I am eagerly waiting for Stef, to give the plugin a grilling under the current textpattern 4.7.0 beta, since the generated key is not working anymore with last beta version of smd_access_key.

Surely he will find a fix.

Offline

Board footer

Powered by FluxBB