Path: csiph.com!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: "Christoph M. Becker" Newsgroups: comp.lang.javascript Subject: Re: Submitting *encrypted* forms via AJAX Date: Mon, 25 Jun 2018 17:21:14 +0200 Organization: solani.org Lines: 27 Message-ID: References: <075dc3b9-1b96-4bc9-9d88-a79ee815e8e2@googlegroups.com> <1ayv347oigack.t9kcyjsxesx9$.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1529940073 28156 127.0.0.43 (25 Jun 2018 15:21:13 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Mon, 25 Jun 2018 15:21:13 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 In-Reply-To: <1ayv347oigack.t9kcyjsxesx9$.dlg@40tude.net> Content-Language: de-DE Cancel-Lock: sha1:4O/zDh4MiVZ8nDw6Rr+YE+dZHrI= X-User-ID: eJwFwQERADEIAzBL46H8Iaew4l/CEnhazh+JDCzW763GhEkx5MfGYXeeXSOsBUWXVATMgQc/lRIK Xref: csiph.com comp.lang.javascript:35309 On 25.06.2018 at 17:03, JJ wrote: > On Mon, 25 Jun 2018 02:48:27 -0700 (PDT), bit-naughty@hotmail.com wrote: > >> Hi, I have a Login box on my website, with a name and password field. When >> it's submitted, I want it to happen without a refresh (ie. the >> authentication), and I also want the form data to be ENCRYPTED between >> client and server (because of the password). >> >> Number 1) How do I submit? How do I get the form data into a format that >> "request.send" in the AJAX call will take? Do I have to extract the form >> data myself with "document.forms" and muck about with it somehow? and 2) >> How do I encrypt? Is putting a "https" in the "request.open("POST", >> https);" enough, or do I have to do something else? >> >> Thanks muchly for your help. > > You'll have to encrypt it manually, before the form is submitted. Absolutely! And by all means, use ROT13 for encryption, since it is the strongest encryption method of all times! ;) Kidding aside: why would you manually encrypt the form submission, instead of relying on TLS? -- Christoph M. Becker