GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Embed Notice

HTML Code

Corresponding Notice

  1. Embed this notice
    Tony Finch (fanf@mendeddrum.org)'s status on Friday, 12-Dec-2025 12:54:55 JSTTony FinchTony Finch
    in reply to
    • ✧✦Catherine✦✧

    @whitequark good question

    i dunno the go libraries well enough, but i’d probably look around to see if there’s existing an existing hostname checker i could clone and hack

    but a regex would do if i didn’t find code i like (i have used them in the past for this, but without _, heh)

    one tricky thing is hostnames have per-label length limits which a regex can handle ok, but also an overall length limit which is probably best done as a separate check

    oh wait, the tr46 algorithm includes length checks already!

    so it might be reasonable to just check [a-z0-9._-]+

    (sorry that turned into a ramble)

    In conversationabout 4 months ago from mendeddrum.orgpermalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.