News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Dev Center

Started by Diego Andrés, December 18, 2012, 03:05:26 AM

Previous topic - Next topic

NanoSector

Quote from: Arantor on January 05, 2013, 12:22:40 PM
I'd argue that making phpinfo open to any user is a security risk, however trivial. What I'd be inclined to do is move it to a page in the admin panel somewhere and possibly even enforce allowedTo('admin_forum') first.
That is one of the reasons I made a setting for this. I could possibly make another setting to allow anyone to access it.
The reason why I did add that feature is because of analysis for support, so users don't have to go and create a phpinfo() file manually.

When adding it to the ACP I'd have to use an iframe or similar because the layout gets screwed up badly otherwise, and I'm not really looking forward to that, not even when it's local on the same server. It's a good thing to consider though.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Arantor

You could capture the content in an output buffer, rewrite it then output it yourself in your own page container ;)

NanoSector

Quote from: Arantor on January 05, 2013, 01:28:49 PM
You could capture the content in an output buffer, rewrite it then output it yourself in your own page container ;)
That's all abracadabra to me, unfortunately :P
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Arantor

ob_start();
php_info();
$content = ob_get_clean();


Then you can apply str_replace or preg_replace to clean it up.

NanoSector

Quote from: Arantor on January 05, 2013, 02:52:49 PM
ob_start();
php_info();
$content = ob_get_clean();


Then you can apply str_replace or preg_replace to clean it up.
Thanks, I'll try to add this in later :)
(might take a long while, though, since I have almost no time tomorrow and next week)
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

4Kstore

This is a nice mod and tool to use while making mods..
thanks yoshi!

¡¡NEW MOD: Sparkles User Names!!!

NanoSector

Quote from: 4Kstore on January 05, 2013, 04:16:08 PM
This is a nice mod and tool to use while making mods..
thanks yoshi!
I'm glad it's useful to you, 4kstore! :)
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Adrek

Installed new version on clean SMF 2.0.3 and above page there is this:
QuoteNotice: Undefined index: devcenter_error_count in C:\Program Files (x86)\Ampps\www\test\Sources\Subs-DevCenter.php on line 57

And in logs:
8: Undefined index: devcenter_error_count
File: C:/Program Files (x86)/Ampps/www/test/Sources/Subs-DevCenter.php
Line: 151

8: Undefined index: devcenter_error_count
File: C:/Program Files (x86)/Ampps/www/test/Sources/Subs-DevCenter.php
Line: 57


/edit:

It showed up only once, after I deleted errors from log it's gone.
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

NanoSector

Yeah, unfortunately that's a bug that's hard to fix :(
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Arantor

Just test for whether it's defined or not before trying to use it?

NanoSector

Quote from: Arantor on January 31, 2013, 12:23:05 PM
Just test for whether it's defined or not before trying to use it?
It's defined under normal circumstances, the only exception being the installation procedure. I can add in a check though.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Arantor

Never assume it is already defined - because it clearly isn't in some cases as shown. Test before use, always, unless you *know* it's declared already, e.g. already declared in that function, or already tested.

NanoSector

Quote from: Arantor on January 31, 2013, 01:01:27 PM
Never assume it is already defined - because it clearly isn't in some cases as shown. Test before use, always, unless you *know* it's declared already, e.g. already declared in that function, or already tested.
Yes, sir! :)
Going to update this in a little bit. Gimme 30 minutes. (no Arantor don't watch the clock :P)
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Arantor

* Arantor starts the timer

1800...
1799...
1798...

;D

NanoSector

Updated in time... ;)
Had to install a code editor, my Mod Manager program, clone the GitHub repo, edit the version number and finally edit the Subs file, then push the changes to GitHub and the mod site... :P

Anyways 0.3.1 is up which *should* fix the issue (should as in untested as I don't have a localhost at hand yet).
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

NanoSector

Mod works with 2.0.4 as-is.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Sudhakar Arjunan

Great mod. Great conversations here. I will try now.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

NanoSector

My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

4Kstore

if someone needs to change the color of debuginfo:

Open: Source/Subs.php
Search:
<div class="smalltext" style="text-align: left; margin: 1ex;">

Replace with:
<div class="smalltext" style="text-align: left; margin: 1ex; color:white;">



Cheers

¡¡NEW MOD: Sparkles User Names!!!

NanoSector

Sorry 4kstore, skipped over your post :)
Thanks for sharing!




Version 0.3.2 is released, which includes a bit of code cleanup and removes the server load checking functionality (it is built into SMF).

Release notes:
- Removed server load checking since it's built in to SMF itself
! Code cleanup

Happy developing!
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Advertisement: