Domanda

Quindi, ho un cliente che richiede una soluzione ai file di protezione da password.Vuole fondamentalmente avere una soluzione simile a OpenDocman.Tuttavia mi ha mostrato qualcosa da un altro cliente che fondamentalmente solo la password protegge il file stesso nessun nome utente.Quindi può caricare file, inserire una password su quel file, inviare collegamenti direttamente a quel file e quindi quando gli utenti fanno clic su un collegamento vengono richiesti con la password e quindi i client lo mette e il file viene rilasciato.Qualcuno conosce una soluzione che può fare questo esatto requisito?

È stato utile?

Soluzione

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.

Altri suggerimenti

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top