forked from GNUsocial/gnu-social
46d9496ee6
These have been failing for ages due to our outputting full URLs all the time, usually with the default protocol instead of the current one. Forms would get output with an http: URL in their contents even when destined for an HTTPS page; while a regular form submission would just warn you about the secure->insecure transition, the AJAX code was failing outright and then not bothering to fall back to the regular submission. I found it was easy to detect the mismatch -- just check the target URL and the current page's protocol before submitting. Since failing over to non-AJAX submission to the HTTP URL throws up a warning, I figured it'd be easier (and much nicer for users) to just let it rewrite the target URL to use the secure protocol & hostname before doing the final submit. This check is now automatically done for anything that calls SN.U.FormXHR() -- making most of our buttons on notices and profile/group headers work naturally. The notice form setup code also runs the rewrite, which gets posting working without an error dialog. I'd prefer in the long run to simply use relative URLs in most of our output; it avoids this problem completely and lets users simply stay in the current protocol mode instead of being constantly switched back to HTTP when clicking around. (Note that folks using the SSLAlways extension to Firefox, for instance, will have their browsers constantly sending them back to HTTP pages, mimicking the desired user experience even though we haven't fully implemented it. These folks are likely going to be a lot happier with forms that submit correctly to go along with it!) |
||
---|---|---|
.. | ||
farbtastic | ||
jcrop | ||
emailsettings.js | ||
identica-badge.js | ||
install.js | ||
jquery.cookie.js | ||
jquery.cookie.min.js | ||
jquery.form.js | ||
jquery.form.min.js | ||
jquery.joverlay.js | ||
jquery.joverlay.min.js | ||
jquery.js | ||
jquery.min.js | ||
json2.js | ||
json2.min.js | ||
Makefile | ||
userdesign.go.js | ||
util.js | ||
util.min.js |