Search Results for 'code'
-
AuthorSearch Results
-
December 27, 2010 at 8:53 pm #98510
In reply to: Security Bug Report Contact
_ck_
ParticipantI am guessing but moving up
esc_urlonly works because the vulnerable url fails the list of allowed protocols. This will break relative urls being passed (try using/forums/for example withouthttp)But since relative is a rare case (I use relative but via plugin) I guess it’s acceptable.
December 27, 2010 at 8:53 pm #103610In reply to: Security Bug Report Contact
_ck_
ParticipantI am guessing but moving up
esc_urlonly works because the vulnerable url fails the list of allowed protocols. This will break relative urls being passed (try using/forums/for example withouthttp)But since relative is a rare case (I use relative but via plugin) I guess it’s acceptable.
December 27, 2010 at 8:48 pm #98509In reply to: Security Bug Report Contact
John James Jacoby
KeymasterIn this topic is fine. Would rather have more eyes on this than less.
The solution involved the shuffling of things around, as well as this specific addition: https://trac.bbpress.org/browser/trunk/bb-login.php#L51
Basically if the esc’ed $re is now empty, fall back to the installation root. At first this seemed like a silly solution, but because the login always attempts to smart redirect, there isn’t a circumstance where it would naturally be empty. By moving the esc’s up and letting them filter out the baddies, it’s possible to end up with an empty $re.
Tested with ampersands and question marks and it appears to work fine. I’ll try more esoteric URL combinations and see if it breaks.
I indented that code because of the repeated empty( $re ) checks. I had a hard time keeping track of how many times it needed to repeat the same check and bumped them in for clarity. Not a common formatting technique but helpful to me at the time.
December 27, 2010 at 8:48 pm #103609In reply to: Security Bug Report Contact
John James Jacoby
KeymasterIn this topic is fine. Would rather have more eyes on this than less.
The solution involved the shuffling of things around, as well as this specific addition: https://trac.bbpress.org/browser/trunk/bb-login.php#L51
Basically if the esc’ed $re is now empty, fall back to the installation root. At first this seemed like a silly solution, but because the login always attempts to smart redirect, there isn’t a circumstance where it would naturally be empty. By moving the esc’s up and letting them filter out the baddies, it’s possible to end up with an empty $re.
Tested with ampersands and question marks and it appears to work fine. I’ll try more esoteric URL combinations and see if it breaks.
I indented that code because of the repeated empty( $re ) checks. I had a hard time keeping track of how many times it needed to repeat the same check and bumped them in for clarity. Not a common formatting technique but helpful to me at the time.
December 27, 2010 at 8:31 pm #98508In reply to: Security Bug Report Contact
_ck_
ParticipantMaybe I am getting rusty, but looking at the diff, I don’t see it.
Basically it’s the same thing, shuffled around a bit and the same
esc_urlandesc_attris being used at the end, which is the same pattern as the existing 1.0/1.1 code.Are you sure the fix was not being caused by just having a more updated version of
esc_urlandesc_attr?Or was it just being solved by moving those two sanitizers up higher before
bb_safe_redirectcould ever be called. Because that was definitely an oversight on someone’s part (not me). Based on the comments I’d guess they thought their functionality was for display filtering and not actually sanitization.Looking at
esc_urlthough, its default is indeed meant for displaying urls by default, note the comment in the code “Replace ampersands and single quotes only when displaying.” and how the context is set by default to “display”.Maybe test your solution with a url that contains an ampersand, it probably will not work?
Also, are you relying on the list of protocols to do the sanitization? Because that could be defeated too (and would prevent using relative urls that are legitimate).
ps. very minor but you have confusing indentation indicating nesting with the code at line 18 – which actually is not nested
Feel free to email me directly if that’s better.
December 27, 2010 at 8:31 pm #103608In reply to: Security Bug Report Contact
_ck_
ParticipantMaybe I am getting rusty, but looking at the diff, I don’t see it.
Basically it’s the same thing, shuffled around a bit and the same
esc_urlandesc_attris being used at the end, which is the same pattern as the existing 1.0/1.1 code.Are you sure the fix was not being caused by just having a more updated version of
esc_urlandesc_attr?Or was it just being solved by moving those two sanitizers up higher before
bb_safe_redirectcould ever be called. Because that was definitely an oversight on someone’s part (not me). Based on the comments I’d guess they thought their functionality was for display filtering and not actually sanitization.Looking at
esc_urlthough, its default is indeed meant for displaying urls by default, note the comment in the code “Replace ampersands and single quotes only when displaying.” and how the context is set by default to “display”.Maybe test your solution with a url that contains an ampersand, it probably will not work?
Also, are you relying on the list of protocols to do the sanitization? Because that could be defeated too (and would prevent using relative urls that are legitimate).
ps. very minor but you have confusing indentation indicating nesting with the code at line 18 – which actually is not nested
Feel free to email me directly if that’s better.
December 27, 2010 at 3:32 pm #98506In reply to: Security Bug Report Contact
John James Jacoby
KeymasterHappy holidays to you too.

I am confident this potential exploit is now fixed, so if anyone wants to put some eyes on the bb-login.php from trunk would be helpful.
December 27, 2010 at 3:32 pm #103606In reply to: Security Bug Report Contact
John James Jacoby
KeymasterHappy holidays to you too.

I am confident this potential exploit is now fixed, so if anyone wants to put some eyes on the bb-login.php from trunk would be helpful.
December 27, 2010 at 10:50 am #98415SEO Shruti
MemberSorry. But there is no such option available.
edit: Please don’t link offsite unless it’s bbPress related – jjj
December 27, 2010 at 10:50 am #103515SEO Shruti
MemberSorry. But there is no such option available.
edit: Please don’t link offsite unless it’s bbPress related – jjj
December 26, 2010 at 6:21 pm #64226In reply to: BBpress Admin for WordPress
andreao
Memberwhat code? I get the same error.
December 25, 2010 at 12:45 am #98553In reply to: Issue with setting the database
WirelessTechie
Memberok, i managed to install bbpress using the quickinstall item from the cpanel.
it took just 5 sec.

the bb-config file is set just like i did manually before, so i still wonder why it didnt work previously…
December 25, 2010 at 12:45 am #103653In reply to: Issue with setting the database
WirelessTechie
Memberok, i managed to install bbpress using the quickinstall item from the cpanel.
it took just 5 sec.

the bb-config file is set just like i did manually before, so i still wonder why it didnt work previously…
December 24, 2010 at 10:35 am #98551In reply to: Issue with setting the database
WirelessTechie
Memberi am with hostgator too

thanks! that’s what i did. i dunno why it cant work.
pff…i thought that was easy to install….
thinking of going back to the good old PHP BB…
December 24, 2010 at 10:35 am #103651In reply to: Issue with setting the database
WirelessTechie
Memberi am with hostgator too

thanks! that’s what i did. i dunno why it cant work.
pff…i thought that was easy to install….
thinking of going back to the good old PHP BB…
December 24, 2010 at 4:32 am #92689In reply to: What's the difference between User Roles?
spinhead
MemberI’ll call it a win anyway

but, really? Administrator can’t manage themes and plugins?
December 23, 2010 at 8:03 pm #92688In reply to: What's the difference between User Roles?
Willabee
MemberZaerl that aint a one-sentence description.
December 23, 2010 at 12:06 pm #98435Anonymous User
InactiveOh – fault.
thx for correction
December 23, 2010 at 12:06 pm #103535Anonymous User
InactiveOh – fault.
thx for correction
December 23, 2010 at 11:16 am #98433zaerl
Participant<?php if( is_bb_admin() ) { ?> class="highlight"<?php } ?>This is wrong Markus.
is_bb_admin(which is deprecated, usebb_is_admin) returns true if the page is an administrative page. It’s just a wrapper that returns the value of the BB_IS_ADMIN constant.December 23, 2010 at 11:16 am #103533zaerl
Participant<?php if( is_bb_admin() ) { ?> class="highlight"<?php } ?>This is wrong Markus.
is_bb_admin(which is deprecated, usebb_is_admin) returns true if the page is an administrative page. It’s just a wrapper that returns the value of the BB_IS_ADMIN constant.December 23, 2010 at 11:04 am #98432Pomy
ParticipantMarkus, thanks again and sorry that I didn’t find this solution over bbpress forum before my last post.
But I think it would be great and easy if it can be achieved with Zaerl’s code??
I mean we can get this solution without touching front-page.php, topic.php, post.php or other files.
And it would be also great to highlight multiple authors by their ids which zearl did for topics/forums.
want something like – $za_highlight_auhors = array(1,8,55,89); ??
Possible?
December 23, 2010 at 11:04 am #103532Pomy
ParticipantMarkus, thanks again and sorry that I didn’t find this solution over bbpress forum before my last post.
But I think it would be great and easy if it can be achieved with Zaerl’s code??
I mean we can get this solution without touching front-page.php, topic.php, post.php or other files.
And it would be also great to highlight multiple authors by their ids which zearl did for topics/forums.
want something like – $za_highlight_auhors = array(1,8,55,89); ??
Possible?
December 23, 2010 at 10:36 am #98431Anonymous User
InactiveFor individual classes for author post you can use
class="highlight_<?php post_author_id();?>"Anonther good starting point to search:
http://phpxref.ftwr.co.uk/bbpress/nav.html?_functions/index.html
There are always different ways to achieve an objective. It is only a question of whether the target should be achieved easily, quickly or safely.
December 23, 2010 at 10:36 am #103531Anonymous User
InactiveFor individual classes for author post you can use
class="highlight_<?php post_author_id();?>"Anonther good starting point to search:
http://phpxref.ftwr.co.uk/bbpress/nav.html?_functions/index.html
There are always different ways to achieve an objective. It is only a question of whether the target should be achieved easily, quickly or safely.
-
AuthorSearch Results