Welcome Guest, Not a member yet? Register   Sign In
Suggestions for designing a app
#2

I don't know what kind of security you'd need here, but assuming that you're going to interact with a database you might look at encoding the links using base64_encode() or something similar. It would at least prevent most URL tampering and SQL injection. Like:

PHP Code:
$link "https://www.somedomain.com?v=".base64_encode("customerid=x&stars=5"); 

Or as a CI URL segment
PHP Code:
$link "https://www.somedomain.com/click/".base64_encode("customerid=x&stars=5"); 


Then upon click check using base64_decode's strict mode like:

PHP Code:
if(base64_decode($request->getPostGet('v'), TRUE)) { } 

or
PHP Code:
if(base64_decode($uri->getSegment(2), TRUE)) { } 


If it returns FALSE, you know something is amiss and you shouldn't trust the values. You also could go a step further and include timestamps or tokens in the string to add even more security.

Hope that gets you going in a good direction.
Designer, developer and Diet Dr. Pepper addict. Messing up PHP since <?= $when['year';] ?>
Reply


Messages In This Thread
Suggestions for designing a app - by rad2 - 09-03-2019, 08:03 PM
RE: Suggestions for designing a app - by jameslittle - 09-03-2019, 09:07 PM
RE: Suggestions for designing a app - by rad2 - 09-05-2019, 08:00 AM
RE: Suggestions for designing a app - by jreklund - 09-05-2019, 11:53 AM
RE: Suggestions for designing a app - by InsiteFX - 09-05-2019, 05:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB