× Joomla Facebook Connect support forum

Topic-icon "Illegal URL format"

Active Subscriptions:

None
15 years 6 months ago #5950 by ricardocoopero
Hi there,

Firstly - great product, easy to install and I nearly got it up and running without any problems! BUT, my SecureLive security component blocks my IP address every time I try to login using the FB Connect module.

I emailed the component support and got this response:

"Your FB component is sending URL data that by W3C standards is in illegal URL format, this is why our system is catching this. I recommend not using this component. This occurs when the system checks the data passed in the return variable of a URL."

Are you aware of this issue, and what do you recommend I do?

I look forward to hearing from you - would love to get this component up and running!

Thanks,

Ricky
The topic has been locked.
Support Specialist
15 years 6 months ago #5952 by alzander
Replied by alzander on topic "Illegal URL format"
I'm not sure I'd recommend against using any component with such little information, but they're their own company.

Anyways, no, I've not heard of that before. I'm curious to know when this happens. Is it after you actually use your Facebook credentials to log into the site, and upon redirection back to your site? There's only a little control we have over the return URL as some of it's generated by Facebook itself. If you could give me a the offending URL, we'd gladly dig into it further to see if we're doing anything that we could be doing better.

If there's any information that security people can provide as to 'what' is illegal about the URL, that would help too. The web is built on standards, but browsers (and therefore developers like us) can not always do things by-the-standards because until we know about it, it isn't really a problem. Hope that makes sense.

Anyways, we'll get you up and running, don't worry about that.. might just take a little extra effort :)
The topic has been locked.
Active Subscriptions:

None
15 years 6 months ago #5960 by ricardocoopero
Replied by ricardocoopero on topic "Illegal URL format"
Hi Alex,

Thanks for the quick response - yeah, don't worry, they're just very cautious. I see from your reviews it's not a big issue. The 'attack' is detected when I click on the 'Connect with Facebook' button for the first time. Another time it happened when I had entered my details and then clicked on the fb login button. Seems like any request from FBConnect causes the problem. As the cust. service person said, it's because you're using a 'return' variable.

Here's the info I found about the attack - hope it helps:

Attack String: /administrator/index.php?option=com_securelive
Referer: http://mywebsite/administrator/index.php?option=com_jfbconnect&controller=config

Thanks in advance!

Ricky
The topic has been locked.
Active Subscriptions:

None
15 years 6 months ago #5961 by ricardocoopero
Replied by ricardocoopero on topic "Illegal URL format"
Forgot to say - it logged over a dozen attacks - each had a slightly different attack used and referrer.
The topic has been locked.
Support Specialist
15 years 6 months ago #5964 by alzander
Replied by alzander on topic "Illegal URL format"
Thanks for the description. I missed above where you mentioned the 'return' variable.

I'm still kind of unsure where the issue is coming from. Variables in URLs can be named any ASCII values (ex. return) and the value of that variable can be BASE64 encoded (which is what we're doing). While BASE64 can be used for nefarious things since it obfuscates the real value, it's not a direct security risk. Additionally, Joomla uses base64 throughout in URLs and POST forms.

If you have any more info from the vendor, or can pass this info along, we'll definitely do what we can to get to the bottom of it. It's trivial for us to change the variable name of 'return' to 'gotolocation', but if that's the problem, that doesn't seem like it's very proactive security. As for using BASE64 encoding, there's not much we can do about that as we need to hand Facebook a URL which it, eventually, needs to hand back to us so that we can get the user back to the correct page on your site after logging in.

Keep us posted, and if you can't get anywhere with the security vendor, let us know and we'll contact them. We don't like people recommending 'not' to use us :)
The topic has been locked.
Active Subscriptions:

None
15 years 6 months ago #5972 by ricardocoopero
Replied by ricardocoopero on topic "Illegal URL format"
Hi there,

I've emailed your comments to my contact and have received this response:

"The name “return” has nothing to do with why our system is blocking it. The issue is that the value of “return” contains URLs in its data that is not Base64 encoded by the time that our component reads the data. This means two things. Either the FB component is running before ours and is decoding it first or that the data was never Base64 encoded before it was sent. If it is the first then this can resolved by making sure that SecureLive’s plugin has an order of 0, which is always highly recommended."

I will set the order to '0' but in the meantime, is the data Base64 encoded? If so, then we've solved the mystery I think!

Thanks,

Ricky
The topic has been locked.
Support Specialist
15 years 6 months ago #5973 by alzander
Replied by alzander on topic "Illegal URL format"
Yes, we definitely base64 encode the URL. Otherwise, it simply wouldn't work.

I'm not sure how the plugin ordering would affect this because I'm not sure how their plugin operates (scans the HTML on the page, looks at the incoming URL, looks at POST/GET variables, etc), but hopefully their solution works.

Definitely let us know how it goes.
The topic has been locked.
Active Subscriptions:

None
15 years 6 months ago #5988 by ricardocoopero
Replied by ricardocoopero on topic "Illegal URL format"
Hi Alex,

Yup - Setting Order to '0' didn't work! I've got the guy from security company to replicate error and he's having a look but says:

"The data is not Base64 encoded, maybe the developer is confused on what part is causing the issue. Here is the data that is being sent:

/component/option,com_jfbconnect/lang,en/return,lw==/session,{///////"session_key///////":///////"2.c97cwzhvub3oqdu_eiko_g__.3600.1290553200-100000161438748///////",///////"uid///////":///////"100000161438748///////",///////"expires///////":1290553200,///////"secret///////":///////"vp8p_awvjjxrwpn1t1akuw__///////",///////"access_token///////":///////"162512733784657|2.c97cwzhvub3oqdu_eiko_g__.3600.1290553200-100000161438748|ntzsvnugslzoazv4eqiihl9qujo///////",///////"sig///////":///////"3939b0616e01b2cb09bb8f09e803f7aa///////"}/task,loginfacebookuser/"

As I've SEF404 installed, I've disabled it temporarily and let him replicate issue so I'll let you know what he says. If you have any brainwaves in the meantime, I'm all ears!

Thanks for your great support on this issue.

Ricky
The topic has been locked.
Active Subscriptions:

None
15 years 6 months ago #5989 by ricardocoopero
Replied by ricardocoopero on topic "Illegal URL format"
And there's more! This sounds like they've finally figured out the problem...

"I have talked with a higher level tech to resolve this false positive and I was told of three options. The first option which we had already discussed would be to base64 encode the session information, or have this GET data be sent though the POST data. The other option would be to correct the data in the session variable to make it fit security standards by eliminating the “\\\\\” from the URL data and making it at most two slashes. Any slashes that are more than 2 will be blocked. I recommend the first option of safe listing this variable until the developer can create a solution."

Does this help?! Are you able to remove the extra '/'s?

Thanks,

Ricky
The topic has been locked.
Support Specialist
15 years 6 months ago #5990 by alzander
Replied by alzander on topic "Illegal URL format"
That URL that's been denied is from Facebook itself. We have no control over it. The variables that are passed in that URL are what let's your site ultimately get an authorization token for the user to interact with your site through Facebook.

I've never heard that multiple forward slashes are a security risk, and I'm not sure why 2 is ok, but 3+ is bad. A quick search didn't turn anything up either, but that's a hard question to search for.

As for converting the data from a GET to a POST, again, we have no control over it. Also, again, I'm unsure why that parameter would be considered "safe" in a POST value but not a GET value when it contains the same data.

Sorry for the non-helpful answers. We know Facebook Connect works on many servers with other Joomla Firewall solutions, Suhosin PHP (secure PHP), CSF/LFD (common Linux Firewall). I'm not sure why Security Live is protecting these URLs. I completely agree with all the secruity you can get, but it doesn't seem correct both from what I've read and from the fact that no other security providers seem to lock down these URLs.

Feel free to post anything else you figure out, but from our end, I don't think there's much more we can do. The next step would be to contact Facebook, if they really are providing non-conformant URLs. Even if they are though, I don't think they'd be too receptive to correcting it.
The topic has been locked.