Jump to content
Sign in to follow this  
DizzyBone&Amy

[Not Finished] Quick Look into Security

Recommended Posts

Ok, so i thought i might help out a little bit with some security techniques. If you have any questions or concerns or want to thank me feel free to reply. Otherwise, don't bother.

So, for our first technique, its pretty simple. Say we want to make sure a variable (in this case $var) is a positive number. We would do the following....

<?php
  $var = 1; // Will Turn out true    $var2 = -1; // False   $var2 = abs((int) $var2); // Will return false and will be turned into positive ( i believe, feel free to tell me otherwise )
?>

Share this post


Link to post
Share on other sites
Ok, so i thought i might help out a little bit with some security techniques. If you have any questions or concerns or want to thank me feel free to reply. Otherwise, don't bother.

So, for our first technique, its pretty simple. Say we want to make sure a variable (in this case $var) is a positive number. We would do the following....

 $var = 1; // Will Turn out true $var2 = -1; // False $var2 = abs((int) $var2); // Will return false and will be turned into positive ( i believe, feel free to tell me otherwise ) 
?>

would not output anything since you did not tell it to (just being picky there)

 

 
<?php 
$var = 1; // Will Turn out true 
echo "$var" ; 
$var2 = -1; // False 
echo "$var2" ; 
$var3 = abs((int) $var2); 
echo "$var3" ; 
// Will return false and will be turned into positive ( i believe, feel free to tell me otherwise ) 
?>

 

$var1 would show "1"

$var2 = "-1"

$var3 = 1

all 3 on the same line since i just just echo 3 times not telling it to go on a new line

Share this post


Link to post
Share on other sites

Is it really really required to go over and over the same stuff?

There is already posts about security. Make em sticky and add on to anything missing from there.

Share this post


Link to post
Share on other sites
Is it really really required to go over and over the same stuff?

There is already posts about security. Make em sticky and add on to anything missing from there.

Yeah, It's a forum discussions are bound to take place, I love too see how people do things different to see if I like that way better and why, Sometimes it's better to see everyone else's style too :).

 

MCCodes have so many ''security experts'' I like to see there experted work (:

Share this post


Link to post
Share on other sites

@danny - i know i don't need the "" should still work O-o

@rulerofzu - if its in one topic its one members views that can be seen (new members never seem to read down thats why they post about errors that are fixed on page 2 of the mods) the more ways to do it that are around the better after all we don't all wish to follow one set of rules :)

@haunted dawg - its basic no one is making a fool out of anyone posting getting help and learning ita what this fourm is for not just people who wish to pay you to fix things up (not trying to be mean)

Share this post


Link to post
Share on other sites
Im not intending to be harsh, or no offence intended here. But why make a fool of yourself when you know squat about security? :(
There's only one way too learn, You post what you think is right and get corrected then you learn :)

Share this post


Link to post
Share on other sites
@haunted dawg - its basic no one is making a fool out of anyone posting getting help and learning ita what this fourm is for not just people who wish to pay you to fix things up (not trying to be mean)

I understand your concept, but my price's are cheap, and no, im not saying come to me. Ask anyone, if they ask me via PM, i'll secure the script they sent me, but now if it become's the hole site, then there is where my cheap price come's in. Now that that is out of the way, but only just yesterday there was a post on also securing number's, which you can see here which contain's the same type of security. Now, would you like it if there is a bunch of thread's from different people all stating how to secure number's, yet, all of them work the same, but just coded different? Why not just post your method in that thread? Then who ever is looking for another way, will simply go look through the thread!

Share this post


Link to post
Share on other sites

you pointing me to my own thread O-o

the hope when i posted that was to help people if there are 100 posts about the same thing it just makes it easy to find nothing wrong with it (in my opinion) as it is posted more people may even start to change it thats what is so good with stuff like this everyone does it in there own little way. what i said was in no way aimed at you i am well aware you are able to create well made pages i have edits of your code running on my site (still only on wamp being tested)

Share this post


Link to post
Share on other sites
you pointing me to my own thread O-o

the hope when i posted that was to help people if there are 100 posts about the same thing it just makes it easy to find nothing wrong with it (in my opinion) as it is posted more people may even start to change it thats what is so good with stuff like this everyone does it in there own little way. what i said was in no way aimed at you i am well aware you are able to create well made pages i have edits of your code running on my site (still only on wamp being tested)

What i was trying to say was that I'd prefer to have your thread which is more detailed, than this one which lack's ALOT.

Share this post


Link to post
Share on other sites

o ummm i did not read that right then. both seem to lack a lot but to be fair title does say not finished

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...