Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-02-11 17:45:59

wornout
Member
From: Italy
Registered: 2009-01-20
Posts: 256
Website

Protect an article with password

What do you think about this solution?

Using two custom fields I set an username and a password to each article.
After with a form I activate the protection.

<txp:password_protect
  login='<txp:custom_field name="user" />'
  pass='<txp:custom_field name="password" />'
/>

Each article includes personal information.
Are there any contraindications?

Offline

#2 2011-12-26 12:54:25

AndrijaM
Member
From: Belgrade, Serbia
Registered: 2007-12-22
Posts: 190
Website

Re: Protect an article with password

I need something like this, does this work, any problem with this aproach, any other solution to protect an article with password?
Thanks!

Offline

#3 2012-01-03 22:15:20

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: Protect an article with password

There is nothing technically wrong with this approach, but keep in mind the passwords will be stored as plain text in the database, so if that is ever compromised, all of those “protected” pages will be too. This probably is not a big deal for light content, but I would never use it to store banking information, social security numbers, or military secrets.


Kevin
(graphicpush)

Offline

#4 2012-01-03 22:28:01

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: Protect an article with password

Does smd_access_keys help?


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#5 2012-01-03 22:30:15

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,947
Website GitHub

Re: Protect an article with password

AndrijaM wrote:

any other solution to protect an article with password?

Although it doesn’t use a password, you can protect an article with a tamper-proof smd_access_key and distribute that key as the ‘password’.

You can optionally limit the number of access attempts or set a time limit on the key itself or the article / file download (or both).

Edit: MattD-ninja-fingers was faster :-)

Last edited by Bloke (2012-01-03 22:31:34)


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

#6 2012-01-06 19:35:10

AndrijaM
Member
From: Belgrade, Serbia
Registered: 2007-12-22
Posts: 190
Website

Re: Protect an article with password

Thanks guys, smd_access_key looks great, good to know about it, but I think for my current situation I’ll just go with txp:password_protect.
Thanks!

Offline

Board footer

Powered by FluxBB