Pregunta

Entonces, tengo un cliente que solicita una solución para proteger con contraseña.Quiere básicamente tener una solución similar a OpenDocman.Sin embargo, me mostró algo de otro cliente que básicamente, solo la contraseña protege el archivo en sí mismo sin nombre de usuario.Para que pueda cargar archivos, coloque una contraseña en ese archivo, envíe enlaces directamente a ese archivo y luego, cuando los usuarios hacen clic en un enlace, se le solicita con la contraseña y luego los clientes lo ponen y el archivo se libera.¿Alguien sabe de una solución que pueda hacer este requisito exacto?

¿Fue útil?

Solución

You can setup a basic validation page so that when a user visits a page they enter the document id (or it's encoded in the link) and you put up a simple form with a password field and a submit button.

If the password matches what is stored in the database for that document id. send that file to the user.

Keep the uploaded files outside the /web directory so you don't have to worry about people hacking the system by guessing filenames.

The files themselves won't have passwords on them, but the only way from the outside to get the file is to have the password.

Otros consejos

If you don't have to have a unique password for every file, you can try apache's mod_auth. You drop a .htaccess & .htpasswd file in the directory you want to protected, and update the users/passwords in the .htpasswd file.

If you want something more dynamic, try mod_auth_mysql, so you have better control from your application.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top