The sid value is only relevant to the user access. The user doesnt care about it, but needs it to access the site.
Many dont bother to just copy the link without the sid and they post it entirely... When a link is detected to have a ?sid= value in it, the phpbb engine should just ignore it and post the link without it. But, i think i recall hearing the sid will be embedded into a cookie, as it should... Its still present in 3.1.5 though.
Remove sid-link value from posts
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.
If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.
If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
- Dragosvr92
- Registered User
- Posts: 624
- Joined: Tue May 31, 2011 12:08 pm
- Location: Romania
- Contact:
Remove sid-link value from posts
Previous user: TheKiller
Avatar on Memberlist 1.0.3
Avatar on Memberlist 1.0.3
- DavidIQ
- Customisations Team Leader
- Posts: 1905
- Joined: Thu Mar 02, 2006 4:29 pm
- Location: Earth
- Contact:
Re: Remove sid-link value from posts
Will be? Has been since version 2 of phpBB, maybe even before that. The reason the SID query string still exists is because of people blocking cookies and incorrect site cookie settings.Dragosvr92 wrote: Sun Aug 16, 2015 2:38 am But, i think i recall hearing the sid will be embedded into a cookie, as it should... Its still present in 3.1.5 though.
I do find the idea of removing the SID as something that might be beneficial though. Could probably just be done through the new parser, if not already being done.
- Dragosvr92
- Registered User
- Posts: 624
- Joined: Tue May 31, 2011 12:08 pm
- Location: Romania
- Contact:
Re: Remove sid-link value from posts
Is it really...? I think it isnt removed completely, from all url types. It seems that only the MCP and ACP links still keep the sids on my board.
Im not blocking cookies and They are configured properly. Its still poping up. I was referring to this btw, viewtopic.php?f=84&t=42577&start=10#p266831
Ive sent a ticket. https://tracker.phpbb.com/browse/PHPBB3-14105
Im not blocking cookies and They are configured properly. Its still poping up. I was referring to this btw, viewtopic.php?f=84&t=42577&start=10#p266831
Ive sent a ticket. https://tracker.phpbb.com/browse/PHPBB3-14105
Previous user: TheKiller
Avatar on Memberlist 1.0.3
Avatar on Memberlist 1.0.3
- DavidIQ
- Customisations Team Leader
- Posts: 1905
- Joined: Thu Mar 02, 2006 4:29 pm
- Location: Earth
- Contact:
Re: Remove sid-link value from posts
There has always been a cookie, otherwise you couldn't stay logged in. If there is an SID being appended to ACP and MCP sessions then that is either a bug or intentional.
- Dragosvr92
- Registered User
- Posts: 624
- Joined: Tue May 31, 2011 12:08 pm
- Location: Romania
- Contact:
Re: Remove sid-link value from posts
I know there was. But it always gave me the impression that not the entire functionality is embedded into a cookie.
Previous user: TheKiller
Avatar on Memberlist 1.0.3
Avatar on Memberlist 1.0.3
Re: Remove sid-link value from posts
There's something in
message_parser::validate_url()
that seems to remove sid=
from local URLs. I can't explain why it calls append_sid()
afterward though.Code: Select all
// Is this a link to somewhere inside this board? If so then remove the session id from the url
if (strpos($url, generate_board_url()) !== false && strpos($url, 'sid=') !== false)
{
$url = preg_replace('/(&|\?)sid=[0-9a-f]{32}&/', '\1', $url);
$url = preg_replace('/(&|\?)sid=[0-9a-f]{32}$/', '', $url);
$url = append_sid($url);
}
message_parser::validate_url()
is not used in 3.2. I've sent a PR that runs the equivalent code in 3.2. However, generate_board_url()
adds a mystery dependency to request
and I think this code is bloat. Removing generate_board_url()
and just removing sid=
from every URL makes it a fair bit less crummy, although I think the whole thing is more trouble than it's worth.Re: Remove sid-link value from posts
Honestly I don't see any good reason to keep the sid from any url.
Member of the phpBB Development-Team
No Support via PM
No Support via PM
Re: Remove sid-link value from posts
Cool, let's shred this diff then. I removed the calls toNicofuma wrote: Wed Aug 19, 2015 7:30 pm Honestly I don't see any good reason to keep the sid from any url.
generate_board_url()
and append_sid()
.https://github.com/phpbb/phpbb/pull/3847
Re: Remove sid-link value from posts
It calls append_sid so if a SID is needed (Client doesn't support cookies, board configured wrong), it adds the SID for the current session, and not from the user who posted.JoshyPHP wrote: Wed Aug 19, 2015 6:27 pm There's something inmessage_parser::validate_url()
that seems to removesid=
from local URLs. I can't explain why it callsappend_sid()
afterward though.
Code: Select all
// Is this a link to somewhere inside this board? If so then remove the session id from the url if (strpos($url, generate_board_url()) !== false && strpos($url, 'sid=') !== false) { $url = preg_replace('/(&|\?)sid=[0-9a-f]{32}&/', '\1', $url); $url = preg_replace('/(&|\?)sid=[0-9a-f]{32}$/', '', $url); $url = append_sid($url); }
message_parser::validate_url()
is not used in 3.2. I've sent a PR that runs the equivalent code in 3.2. However,generate_board_url()
adds a mystery dependency torequest
and I think this code is bloat. Removinggenerate_board_url()
and just removingsid=
from every URL makes it a fair bit less crummy, although I think the whole thing is more trouble than it's worth.
Re: Remove sid-link value from posts
But do you know why it calls append_sid()? Why would it remove the SID of a link and replace it with the SID of the user posting/editing the text?paulus wrote: Thu Aug 20, 2015 7:16 am It calls append_sid so if a SID is needed (Client doesn't support cookies, board configured wrong), it adds the SID for the current session, and not from the user who posted.