Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Dr. Bunsen on July 30, 2012, 03:52:43 AM

Title: SMF forum url/registration mail link
Post by: Dr. Bunsen on July 30, 2012, 03:52:43 AM
Hi,

When I register I get this:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fgyazo.com%2F028306e59c5145ddd06d47ed72777255.png%3F1343634262&hash=371ed54b7c941dcba8294f65b4e0bc015dfbad4e)

I found that the forum url is http://192.168.1.20
I cant edit that, not by admin panel, not with repair_settings. I could offcourse edit the emailtemplate, but I dont like non dynamic things.

I cant edit this line in Database & paths: (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fgyazo.com%2F2d9e0725ee890758122cf2db294a5ba1.png%3F1343633909&hash=e13dd40775bca1a7a6e1b3d58baceedb688b8905)
^ Just for clarification

If any1 could help, thanks
Title: Re: SMF registration email(not an edit question)
Post by: Colin on July 30, 2012, 03:54:52 AM
Are you hosting your server on a local environment? Do you have a domain name that is pointed to the server that you want to change the forum URL too?
Title: Re: SMF registration email(not an edit question)
Post by: Dr. Bunsen on July 30, 2012, 04:00:24 AM
well, I am hosting at home, but everything is linked with the site url, just not this part, smilies are url/smilies etc, only the registration mail is kinda screwed..... I have got an domain: evolutionofcraft.tk, so it should be possible, it just wont let me....
Title: Re: SMF forum url/registration mail link
Post by: Arantor on July 30, 2012, 09:27:15 AM
Use repair-settings to fix the URLs: What is repair_settings.php? (http://wiki.simplemachines.org/smf/Repair_settings.php)

Though you should be able to change it in Admin > Configuration > Server Settings somewhere.
Title: Re: SMF forum url/registration mail link
Post by: Dr. Bunsen on July 30, 2012, 01:09:52 PM
Thanks, but as I stated before:"I cant edit that, not by admin panel, not with repair_settings. I could offcourse edit the emailtemplate, but I dont like non dynamic things."

you got any other advice? because this kinda sucks....

edit: it still wont save my change, and I found that it takes a long time to update something I changed, the best way is to update thing a and then update something else(just dont change anything) to get get thing a instantly updated, but this doenst work with the forum url though......
Title: Re: SMF forum url/registration mail link
Post by: Arantor on July 30, 2012, 01:17:16 PM
Except that it's not part of the email templates. It's injected in during the email process - from the master settings.

Sounds like your Settings.php file is unwritable, which would explain all the problems you're having...
Title: Re: SMF forum url/registration mail link
Post by: Dr. Bunsen on July 30, 2012, 01:37:55 PM
Quote from: Arantor on July 30, 2012, 01:17:16 PM
Except that it's not part of the email templates. It's injected in during the email process - from the master settings.

Sounds like your Settings.php file is unwritable, which would explain all the problems you're having...

I checked all the writeable issues, I 777d the setting file and all the others(running linux) still nothing...
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fgyazo.com%2F33b4273ccf116a9ad886496e03789268.png%3F1343668862&hash=9e219450a841cd0eddc47656971a012fff953b7c)
I kinda knew this wasn't a writable issue, since I fixes those before.

And I saw the email template, I saw what it kinda does(didnt check where it got it's adresses etc). but this is kinda weird to say atleast....
Title: Re: SMF forum url/registration mail link
Post by: Arantor on July 30, 2012, 01:39:21 PM
Are you using pretty URLs?
Title: Re: SMF forum url/registration mail link
Post by: Dr. Bunsen on July 30, 2012, 01:43:10 PM
Quote from: Arantor on July 30, 2012, 01:39:21 PM
Are you using pretty URLs?

not if its not standard :) (O do I hate the verification code >:()
Title: Re: SMF forum url/registration mail link
Post by: Arantor on July 30, 2012, 01:46:20 PM
So, does the forum URL line in the database settings contain that mythical 192.168.1.20 address? (Since that's pulled from Settings.php which you've indicated is not that)
Title: Re: SMF forum url/registration mail link
Post by: Dr. Bunsen on July 30, 2012, 01:53:53 PM
Quote from: Arantor on July 30, 2012, 01:46:20 PM
So, does the forum URL line in the database settings contain that mythical 192.168.1.20 address? (Since that's pulled from Settings.php which you've indicated is not that)

you mean in my database? since in smf_settings there is no such thing as 192.168.1.20 or evolutionofcraft.tk, I think you lost me there xD

twI will be back in I dno, like a few hours, telling so you don't think I just left :P
Title: Re: SMF forum url/registration mail link
Post by: Arantor on July 30, 2012, 01:56:13 PM
You said that the forum URL option, as screencapped above was not editable... but you never actually said what *that* said.

Also, check smf_themes as well ;)
Title: Re: SMF forum url/registration mail link
Post by: Dr. Bunsen on July 31, 2012, 03:58:45 AM
Quote from: Arantor on July 30, 2012, 01:56:13 PM
You said that the forum URL option, as screencapped above was not editable... but you never actually said what *that* said.

Also, check smf_themes as well ;)

not in that database part either, could it be that I cant connect to my own ip, like my ip is 123.456.789.10 (example) and when I connect to 123.456.789.10 I cant reach it..... since I dont see my signature picture well others dont :P
Title: Re: SMF forum url/registration mail link
Post by: Arantor on July 31, 2012, 06:52:38 AM
No, that address is stored somewhere and it then gets injected into the code. SMF out of the box uses the settings in Settings.php to build the URL so if you have something reinjecting 192.168.1.20 in its place, there is something very weird going on.
Title: Re: SMF forum url/registration mail link
Post by: Dr. Bunsen on July 31, 2012, 03:07:05 PM
Quote from: Arantor on July 31, 2012, 06:52:38 AM
No, that address is stored somewhere and it then gets injected into the code. SMF out of the box uses the settings in Settings.php to build the URL so if you have something reinjecting 192.168.1.20 in its place, there is something very weird going on.

well the only mod is bad behavior http://www.bad-behavior.ioerror.us/
but I am still unable to change the forum url in the admin panel etc. btw I rebooted the system, no luck.....
I could upload some files if you want? I have no clue why its not working :S
Title: Re: SMF forum url/registration mail link
Post by: Dr. Bunsen on August 02, 2012, 04:57:48 AM
so there is no1 left to help me?
Title: Re: SMF forum url/registration mail link
Post by: Arantor on August 02, 2012, 05:45:11 AM
I still think it's wrong in the database or Settings.php file even though you're adamant it isn't. They're the only places it's used.
Title: Re: SMF forum url/registration mail link
Post by: Dr. Bunsen on August 02, 2012, 07:40:48 AM
Quote from: Arantor on August 02, 2012, 05:45:11 AM
I still think it's wrong in the database or Settings.php file even though you're adamant it isn't. They're the only places it's used.

well I am not sure where it comes from, but the tables you refered too don't contain "192.168.1.20" or "www.evolutionofcraft.tk".
So I am not sure what to do now. Since you saw yourself it says in the settings.php "evolutionofcraft.tk".

edit: just went through every database table again, nothing with 192.168.1.20, but I couldnt find an www.evolutionofcraft.tk either, only /smilys etc
editedit: no 192.168.1.20 in the settings file neither.... the settings file in the main folder that is, or should I have checked another file?
Title: Re: SMF forum url/registration mail link
Post by: Arantor on August 02, 2012, 04:20:06 PM
So the settings file is right, as per the screenshot. And it's not in any part of smf_settings or smf_themes? How EXACTLY are you checking that?
Title: Re: SMF forum url/registration mail link
Post by: Dr. Bunsen on August 03, 2012, 03:31:20 AM
Quote from: Arantor on August 02, 2012, 04:20:06 PM
So the settings file is right, as per the screenshot. And it's not in any part of smf_settings or smf_themes? How EXACTLY are you checking that?

I just do: "SELECT * FROM [table_name]" and scroll through it
Title: Re: SMF forum url/registration mail link
Post by: Dr. Bunsen on August 03, 2012, 03:53:04 AM
Quote from: Dr. Bunsen on August 03, 2012, 03:31:20 AM
Quote from: Arantor on August 02, 2012, 04:20:06 PM
So the settings file is right, as per the screenshot. And it's not in any part of smf_settings or smf_themes? How EXACTLY are you checking that?

I just do: "SELECT * FROM [table_name]" and scroll through it

edit: just got this: (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fgyazo.com%2F236f0a9c432cdf5181c0c4c4dc660b9f.png%3F1343979482&hash=f968435baf773a96824012e0631ebb497c906b59)

but the registration is still: (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fgyazo.com%2Fbe6d0329321d5a6bda3e692185b8ee81.png%3F1343979560&hash=2dc0c6e9b2293b3c5f1e5b55c5287305ce5f6f75)

edit: oops that wasnt supposed to be a quote
Title: Re: SMF forum url/registration mail link
Post by: Dr. Bunsen on August 03, 2012, 04:09:40 AM
O I think I just solved it, the forum takes the url from ur browser, since I tried it with a proxy, and look at my nice email:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fgyazo.com%2Ff10971a0260a63c598fc00776eb12206.png%3F1343980561&hash=56580502255cfff3fbacb9a4374a410b9e218601)

so not from the files, since other people started receiving normal emails too, but when I do it locally, it still gives 192.168.1.20

but is there a way to force it to use evolutionofcraft.tk?
Title: Re: SMF forum url/registration mail link
Post by: Arantor on August 03, 2012, 07:59:53 AM
I'm still wondering what you've broken in the code because the core remainder code calls the main email template handler, which always substitutes $scripturl in, but $scripturl is based on $boardurl which is set in the Settings.php file.

If you're using the email template editor mod, or pretty URLs, now would be the time to mention this - because I can't reproduce this even using a proxy on any site I operate.
Title: Re: SMF forum url/registration mail link
Post by: Dr. Bunsen on August 03, 2012, 02:40:51 PM
Quote from: Arantor on August 03, 2012, 07:59:53 AM
I'm still wondering what you've broken in the code because the core remainder code calls the main email template handler, which always substitutes $scripturl in, but $scripturl is based on $boardurl which is set in the Settings.php file.

If you're using the email template editor mod, or pretty URLs, now would be the time to mention this - because I can't reproduce this even using a proxy on any site I operate.

I tolf you before, the only mod I use is bad behaviour, and I didnt edit anything, its just a fresh smf 2.0.2 install.
But it just grabs the url from the browser...
Title: Re: SMF forum url/registration mail link
Post by: Arantor on August 03, 2012, 02:45:00 PM
And as I'm telling you, there is nowhere in the core SMF where it does that.
Title: Re: SMF forum url/registration mail link
Post by: Dr. Bunsen on August 04, 2012, 10:40:29 AM
Quote from: Arantor on August 03, 2012, 02:45:00 PM
And as I'm telling you, there is nowhere in the core SMF where it does that.

And I am telling you, I see it happening right here. I tested it, it really does.
Title: Re: SMF forum url/registration mail link
Post by: Arantor on August 04, 2012, 10:48:37 AM
And yet I cannot reproduce it on any of the forums I run - even with proxies and all kinds of URL spoofing.

If it used the supplied URL that would actually be a very nasty form of vulnerability - and since it's all done in the same place in the same exact code (loadEmailTemplate() in Subs-Post.php), every single email should be broken and yet it's not.
Title: Re: SMF forum url/registration mail link
Post by: Dr. Bunsen on August 04, 2012, 11:07:45 AM
Quote from: Arantor on August 04, 2012, 10:48:37 AM
And yet I cannot reproduce it on any of the forums I run - even with proxies and all kinds of URL spoofing.

If it used the supplied URL that would actually be a very nasty form of vulnerability - and since it's all done in the same place in the same exact code (loadEmailTemplate() in Subs-Post.php), every single email should be broken and yet it's not.

well, I didnt adjust a thing, it's just a fresh install, but I just use a proxy when I send an email with an url, since else, there is 192.168.1.20 in it, cuz I cant connect to my own ip(stupid isp).
I find it very strange too, but it just does this....
Title: Re: SMF forum url/registration mail link
Post by: Dr. Bunsen on September 09, 2012, 11:16:13 AM
Quote from: Arantor on August 04, 2012, 10:48:37 AM
And yet I cannot reproduce it on any of the forums I run - even with proxies and all kinds of URL spoofing.

If it used the supplied URL that would actually be a very nasty form of vulnerability - and since it's all done in the same place in the same exact code (loadEmailTemplate() in Subs-Post.php), every single email should be broken and yet it's not.

sorry for the gravedig

well, when I was making my navbar links dynamic, I found that $scripturl is actually domain atm local ip(so 192.168.1.x) or my ip + /action=?
and then I can use the navbar from inside my network(it shows when hovering 192.168.1.x/action=?) and outside(domain/ip.action=?). The example /action=? is not the exact code, but its highly dynamic........
So i just showed proof the forum actually works that way:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fspeedcap.net%2Fimg%2Fcd47aab6ce84b0d8ff6ca389a0c23549%2Fb1bd977a.png&hash=7d2cbc8e354eedcefa3c3bd250b0db237063837f)