🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #90630

Re: alternative nnrpd external auth to postgresql

#90630
From: go-while
Date: Thu, 27 Jul 2023 21:30
24 lines
1571 bytes
On 27.07.23 21:36, rek2 hispagatos wrote:
> OK this is already deployed and working, feel free to submit patches,
> there are a lot to do still but is working now and is live on my own
> server.
> 
> Happy Hacking
> ReK2
> 

great work!

i dont know about rust and pgsql so i need ask question:

this code is safe against sql injection?

     let creds = sqlx::query_as!(
         Creds,
         "SELECT usenet_password FROM users WHERE usenet_username = $1",
         username
     )

no need to check if username is alphanum before passing to db?

fn clean() splits by whitespace and parses to string only?
Technical Details
Message-ID: <YJAwM.249652$Y1R7.117864@fx04.ams4>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <u9jlnh$getb$1@matrix.hispagatos.org> <u9uh09$a5ql$1@matrix.hispagatos.org>

Show Full Headers
Complete Article Headers
Message-ID: <YJAwM.249652$Y1R7.117864@fx04.ams4>
Subject: Re: alternative nnrpd external auth to postgresql
Date: Thu, 27 Jul 2023 23:30:01 +0200
From: go-while <no-reply@no.spam>
References: <u9jlnh$getb$1@matrix.hispagatos.org> <u9uh09$a5ql$1@matrix.hispagatos.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0
Newsgroups: news.software.nntp
Content-Language: en-US
In-Reply-To: <u9uh09$a5ql$1@matrix.hispagatos.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 24
X-Complaints-To: abuse@blocknews.net
Nntp-Posting-Date: Thu, 27 Jul 2023 20:47:52 UTC
Organization: blocknews - www.blocknews.net