QUOTE (inca @ Nov 24 2008, 11:02 PM) <{POST_SNAPBACK}>
yeah whole script would need editing i take it you want to link anywhere into your site and not give your session id away?
this is what i want. lol
Started on the old forum in November 2008 · view the original in the archive · old links redirect here
Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.
QUOTE (inca @ Nov 24 2008, 11:02 PM) <{POST_SNAPBACK}>
yeah whole script would need editing i take it you want to link anywhere into your site and not give your session id away?
this is what i want. lol
Like what iv got on my site 😛 just create a new bb code eg [internal=index.php?action=main]home [/internal] but then include session id in core rather than in the link 🙂 but bewarned you have to do it right otherwize you could end up with a hacking problem 🙂
eg: mysite.com/imGoingToStealYourSessionId.php?sid=$sid
🙂
QUOTE (inca @ Nov 24 2008, 11:17 PM) <{POST_SNAPBACK}>
Like what iv got on my site 😛 just create a new bb code eg [internal=index.php?action=main]home [/internal] but then include session id in core rather than in the link 🙂 but bewarned you have to do it right otherwize you could end up with a hacking problem 🙂
eg: mysite.com/imGoingToStealYourSessionId.php?sid=$sid
:)
Is it possible to explain that a little bit more laugh, because I don't want that someone hack me. How safe is the modified lavalair-version wapdesire. I used wapdesire. Today I read a lot here in the forum and a few people mean that lavalair is mighty crap, because it can be hacked by somebody. My problem is: I can read php code, but not writelaugh. I have play with wordpress a long time ago and so I learn a bit of php.
just copy the url bb in core.php but change it to have session id in it 🙂 I cant code everything for you as that way you would never learn 🙂 (all the codes are in this topic you need)
wapdesire has got more security problems than lavalair. im not going to say where and how because it will just lead to more hacking. The main thing to do not to be hacked is not to piss other sites off by spamming or taking there contents... pics etc from there sites..... Most Hackers dont normally go around looking for sites to hack. They just hack the people who piss them off.
QUOTE (inca @ Nov 25 2008, 08:04 PM) <{POST_SNAPBACK}>
lts a lot of work for what a simple bb code could sort out :P
LOL. Inca, your way is another, because the session-id is only hidden by posting url with this bbcode. If a user post a complete link directly from browser, then the complete code will be shown. Mod rewrite should hide the sessionID at the beginning, so the user himself doesn't see it.
The Problem is the rewrite rules. At the moment I try a lot, but nothing would do the job. smile
nearly 🙂 you need an ending postion as that will delete everything after sid
need 2 codes first 1 to end at the & symbol and the other for ]
because not all of the bookmarks end in sid= 🙂
QUOTE (inca @ Nov 26 2008, 12:52 AM) <{POST_SNAPBACK}>
nearly 🙂 you need an ending postion as that will delete everything after sid
need 2 codes first 1 to end at the & symbol and the other for ]
because not all of the bookmarks end in sid= :)
Can you give me an example code?
i havent tested this as my url bb code is totaly different because i use an external links page.
if(substr_count($text,"[url=")>0){
$text = preg_replace("/&sid=(.*?)&/is","&",$text);
$text = preg_replace("/&sid=(.*?)\]/is","]",$text);
}
if((substr_count($text,"http://yoursite.com")>0)&&(substr_count($text,"@")<1)&&(substr_count($text,"http://")<2)){
$text = preg_replace("/\[url\=(.*?)\](.*?)\[\/url\]/is","<a href=\"$1&sid=$sid\">$2</a>",$text);
}else{
$text = preg_replace("/\[url\=(.*?)\](.*?)\[\/url\]/is","<a href=\"$1\">$2</a>",$text);
}
it might need a little more work for security but most of it is here 🙂
you may have to create a second bb code function in core.php to work in input boxes so mods cant get session id 😛
function deletesid($text){
$text = preg_replace("/&sid=(.*?)&/is","&",$text);
$text = preg_replace("/&sid=(.*?)\]/is","]",$text);
return $text;
}
usage:
$text = deletesid($text); echo "<input value="$text" name="post"/>";
the other codes you might need to add is to protect against other https:// or maybe ftp or mail and any other links you can think of 🙂 sorry my brains not functioning 100% today
QUOTE (inca @ Nov 26 2008, 12:41 PM) <{POST_SNAPBACK}>
function deletesid($text){ $text = preg_replace("/&sid=(.*?)&/is","&",$text); $text = preg_replace("/&sid=(.*?)\]/is","]",$text); return $text; }usage:
$text = deletesid($text); echo "<input value="$text" name="post"/>";
the other codes you might need to add is to protect against other https:// or maybe ftp or mail and any other links you can think of 🙂 sorry my brains not functioning 100% today
Hi Inca,
in other words:
I must add these two codes zu my bbcodes:
code1:
if(substr_count($text,"[url=")>0){
$text = preg_replace("/&sid=(.*?)&/is","&",$text);
$text = preg_replace("/&sid=(.*?)\]/is","]",$text);
}
if((substr_count($text,"http://yoursite.com")>0)&&(substr_count($text,"@")<1)&&(substr_count($text,"http://")<2)){
$text = preg_replace("/\[url\=(.*?)\](.*?)\[\/url\]/is","<a href=\"$1&sid=$sid\">$2</a>",$text);
}else{
$text = preg_replace("/\[url\=(.*?)\](.*?)\[\/url\]/is","<a href=\"$1\">$2</a>",$text);
}
code2:
function deletesid($text){
$text = preg_replace("/&sid=(.*?)&/is","&",$text);
$text = preg_replace("/&sid=(.*?)\]/is","]",$text);
return $text;
}
Last but not least I must add this function before every inputfield? $text = deletesid($text);
yeah add the 1 code to your bb codes (probably best at bottom of bb codes 🙂 2nd code add anywhere in core.php as long as its not inside any other function and the 3rd before inputs on the edit posts 🙂 you may need to change the strings name.... $text to the appropriate stings name that is already inside the value of the input boxes 🙂
just been looking at my codes and it will fail if someone enters 2 url bb codes in 1 post 🙁 but it has to be there to prevent any external links containg session id 🙂
QUOTE (dacha987 @ Nov 26 2008, 06:40 PM) <{POST_SNAPBACK}>
code for this have on rukiya`s forum and works fine ;)
i've posted that code... but seems to me, some ppl are blind here...
It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!