php - Writing parameters to a database and link encryption -


i writing database using parameters link.

consider following link:

mywebsite.com/index.php?ud=33&nt=117&g=yes 

if play link , change values write database wrong data, available ways prevent happening?

note links clicked email message

what thinking of 1 time authentication key per message works 1 time cost alot of space on databas, there better way?

remember sensitive data shouldn't in querystring.

follow these steps:

1 - before write link database, should check part of business rule if parameters consistent , user has permission access it.

2 - then, should think params of querystring should in plain text (i.e. inside link stored in database). example, if keep id of entity querystring , send database, must think if there problems in case mentioned entity deleted. since querystring in plain text, no cascade performed. in case, best approach convert query string data , store in database foreign keys instead of querystring. then, can recover full link constructing @ application level.


another tip:

since sending link e-mail, can convert string in plain text (in scenario, ud=33&nt=117&g=yes) running encryption algorithm convert 1 single encrypted string. have mywebsite.com/index.php?c=ijnwei7we876fwepowokemf. less user-friendly , play-proof.

hope helps.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -