jdev - 2020-04-13

  1. aj has joined

  2. strar has left

  3. aj has left

  4. strar has joined

  5. debacle has left

  6. aj has joined

  7. aj has left

  8. SouL has joined

  9. DebXWoody has joined

  10. DebXWoody has left

  11. DebXWoody has joined

  12. paul has joined

  13. moparisthebest has left

  14. asterix has joined

  15. kikuchiyo has joined

  16. strar has left

  17. wurstsalat has left

  18. strar has joined

  19. kikuchiyo has left

  20. kikuchiyo has joined

  21. pulkomandy has left

  22. asterix has left

  23. asterix has joined

  24. pulkomandy has joined

  25. wurstsalat has joined

  26. DebXWoody has left

  27. DebXWoody has joined

  28. asterix has left

  29. asterix has joined

  30. asterix has left

  31. asterix has joined

  32. kikuchiyo has left

  33. kikuchiyo has joined

  34. Marc has joined

  35. pulkomandy has left

  36. pulkomandy has joined

  37. sonny has joined

  38. adrien has left

  39. larma has left

  40. DebXWoody has left

  41. DebXWoody has joined

  42. DebXWoody has left

  43. DebXWoody has joined

  44. DebXWoody has left

  45. DebXWoody has joined

  46. larma has joined

  47. asterix has left

  48. asterix has joined

  49. pulkomandy has left

  50. adrien has joined

  51. kikuchiyo has left

  52. pulkomandy has joined

  53. kikuchiyo has joined

  54. adrien has left

  55. asterix has left

  56. adrien has joined

  57. asterix has joined

  58. lovetox has joined

  59. pulkomandy has left

  60. pulkomandy has joined

  61. pulkomandy has left

  62. pulkomandy has joined

  63. asterix has left

  64. asterix has joined

  65. lovetox_ has joined

  66. Zash has left

  67. Zash has joined

  68. pulkomandy has left

  69. pulkomandy has joined

  70. debacle has joined

  71. debacle has left

  72. debacle has joined

  73. Jae has joined

  74. debacle has left

  75. debacle has joined

  76. debacle has left

  77. debacle has joined

  78. debacle has left

  79. debacle has joined

  80. debacle has left

  81. debacle has joined

  82. debacle has left

  83. debacle has joined

  84. debacle has left

  85. serge90 has joined

  86. debacle has joined

  87. asterix has left

  88. asterix has joined

  89. debacle has left

  90. debacle has joined

  91. asterix has left

  92. asterix has joined

  93. pulkomandy has left

  94. goffi has joined

  95. lovetox_ has left

  96. lovetox_ has joined

  97. pulkomandy has joined

  98. lovetox_ has left

  99. lovetox_ has joined

  100. lovetox_ has left

  101. lovetox_ has joined

  102. lovetox_ has left

  103. lovetox_ has joined

  104. lovetox_ has left

  105. lovetox_ has joined

  106. lovetox_ has left

  107. lovetox has left

  108. sonny has left

  109. lovetox has joined

  110. Martin has left

  111. Martin has joined

  112. pulkomandy has left

  113. pulkomandy has joined

  114. sonny has joined

  115. Jae has left

  116. Jae has joined

  117. Jae has left

  118. Jae has joined

  119. serge90 has left

  120. serge90 has joined

  121. serge90 has left

  122. serge90 has joined

  123. serge90 has left

  124. serge90 has joined

  125. Jae has left

  126. serge90 has left

  127. serge90 has joined

  128. Jae has joined

  129. pulkomandy has left

  130. serge90 has left

  131. serge90 has joined

  132. pulkomandy has joined

  133. goffi has left

  134. goffi has joined

  135. serge90 has left

  136. serge90 has joined

  137. serge90 has left

  138. serge90 has joined

  139. serge90 has left

  140. serge90 has joined

  141. adrien has left

  142. serge90 has left

  143. serge90 has joined

  144. Jae has left

  145. moparisthebest has joined

  146. Jae has joined

  147. pulkomandy has left

  148. pulkomandy has joined

  149. adrien has joined

  150. kikuchiyo has left

  151. kikuchiyo has joined

  152. kikuchiyo has left

  153. kikuchiyo has joined

  154. Jae has left

  155. pulkomandy has left

  156. rion has left

  157. rion has joined

  158. pulkomandy has joined

  159. kikuchiyo has left

  160. kikuchiyo has joined

  161. kikuchiyo has left

  162. kikuchiyo has joined

  163. kikuchiyo has left

  164. pulkomandy has left

  165. serge90 has left

  166. serge90 has joined

  167. kikuchiyo has joined

  168. pulkomandy has joined

  169. Jae has joined

  170. kikuchiyo has left

  171. lovetox has left

  172. lovetox has joined

  173. kikuchiyo has joined

  174. strar has left

  175. strar has joined

  176. kikuchiyo has left

  177. Jae has left

  178. Jae has joined

  179. paul has left

  180. kikuchiyo has joined

  181. kikuchiyo has left

  182. kikuchiyo has joined

  183. paul has joined

  184. lovetox_ has joined

  185. lovetox_ has left

  186. lovetox_ has joined

  187. lovetox_ has left

  188. kikuchiyo has left

  189. pulkomandy has left

  190. kikuchiyo has joined

  191. pulkomandy has joined

  192. Guus has left

  193. Guus has joined

  194. Wojtek has joined

  195. martin has joined

  196. martin has left

  197. martin has joined

  198. martin has left

  199. martin has joined

  200. martin has left

  201. martin has joined

  202. martin has left

  203. martin has joined

  204. martin has left

  205. martin has joined

  206. kikuchiyo has left

  207. martin has left

  208. kikuchiyo has joined

  209. martin has joined

  210. martin has left

  211. martin has joined

  212. Jae has left

  213. Jae has joined

  214. martin has left

  215. martin has joined

  216. pulkomandy has left

  217. martin has left

  218. martin has joined

  219. martin has left

  220. martin has joined

  221. pulkomandy has joined

  222. martin has left

  223. martin has joined

  224. martin has left

  225. martin has joined

  226. martin has left

  227. martin has joined

  228. martin has left

  229. kikuchiyo has left

  230. martin has joined

  231. martin has left

  232. martin has joined

  233. Jae has left

  234. martin has left

  235. martin has joined

  236. martin has left

  237. martin has joined

  238. martin has left

  239. martin has joined

  240. Jae has joined

  241. martin has left

  242. martin has joined

  243. martin has left

  244. martin has joined

  245. martin has left

  246. martin has joined

  247. martin has left

  248. martin has joined

  249. paul has left

  250. paul has joined

  251. paul has left

  252. martin has left

  253. martin has joined

  254. Jae has left

  255. martin has left

  256. Jae has joined

  257. martin has joined

  258. martin has left

  259. martin has joined

  260. martin has left

  261. martin has joined

  262. martin has left

  263. martin has joined

  264. amnesia has joined

  265. paul has joined

  266. martin has left

  267. martin has joined

  268. martin has left

  269. pulkomandy has left

  270. martin has joined

  271. martin has left

  272. martin has joined

  273. pulkomandy has joined

  274. martin has left

  275. martin has joined

  276. martin has left

  277. martin has joined

  278. adrien has left

  279. adrien has joined

  280. Wojtek has left

  281. Wojtek has joined

  282. martin has left

  283. Wojtek has left

  284. Wojtek has joined

  285. Wojtek has left

  286. martin has joined

  287. pulkomandy has left

  288. martin has left

  289. pulkomandy has joined

  290. martin has joined

  291. SouL has left

  292. SouL has joined

  293. amnesia has left

  294. pulkomandy has left

  295. Wojtek has joined

  296. lovetox_ has joined

  297. lovetox_ has left

  298. pulkomandy has joined

  299. Jae has left

  300. amnesia has joined

  301. goffi has left

  302. goffi has joined

  303. pulkomandy has left

  304. Jae has joined

  305. pulkomandy has joined

  306. pulkomandy has left

  307. pulkomandy has joined

  308. sonny has left

  309. pulkomandy has left

  310. pulkomandy has joined

  311. alexis has left

  312. paul has left

  313. paul has joined

  314. lovetox

    so for domainnames normally i use stringprepare

  315. lovetox


  316. lovetox

    but in python there is module available that does the idna2008 standard

  317. jonas’

    I don’t like where this is going

  318. lovetox

    can i just switch to that, or is this going to be problematic?

  319. Zash

    Me neither

  320. jonas’

    no, those are different things

  321. pulkomandy has left

  322. lovetox


  323. jonas’

    you need to do nameprep first, then you can IDNA-encode the name before handing it to the DNS server

  324. jonas’

    IDNA is an encoding (unicode -> DNS-compatible ascii bytes)

  325. jonas’

    like UTF-8 is an encoding

  326. jonas’

    problem is: there are two incompatible versions of idna, and nobody knows which one to use

  327. lovetox

    im talking about validating domainnames

  328. jonas’


  329. lovetox

    in python there is a idna standard module

  330. jonas’

    that’s all validation you need

  331. lovetox

    it offers a method thats called nameprep

  332. jonas’

    there is no idna module in the python standard library

  333. jonas’

    according to https://docs.python.org/3/library/

  334. lovetox

    its a submodule of stringprepare

  335. jonas’

    there is no stringprepare module either

  336. lovetox

    or stringprep dont know

  337. pulkomandy has joined

  338. jonas’

    stringprep doesn’t have submodules AFAIK. most certainly not an `idna` submodule

  339. Zash

    It hasn't been long enough since some user put http://example.com:5280/ as their XMPP server name and everything was fine with that.

  340. jonas’

    I’m wondering what you’re talikng about. LTIC python only supported IDNA2003

  341. lovetox

    ok https://github.com/python/cpython/blob/e42b705188271da108de42b55d9344642170aa2b/Lib/encodings/idna.py

  342. lovetox

    its a encoding

  343. jonas’

    as I said, yes

  344. jonas’

    and it’s IDNA2003

  345. jonas’

    not 2008

  346. jonas’

    again, IDNA* are encodings like UTF-8 are encodings. has nothing to do with validation or normalisation like nameprep does

  347. lovetox

    yes and it has a method call nameprep

  348. jonas’


  349. jonas’

    but it’s not public API

  350. jonas’

    seems as if nameprep is a precondition for IDNA2003 and they’re doing that for you

  351. lovetox

    oh ok so thats what confused me

  352. jonas’

    you can do a call to codecs.encode(some_domain, "idna") and if it doesn’t raise UnicodeEncodeError, then you know that it passes nameprep

  353. martin has left

  354. lovetox

    soo can is witch to nameprep -> IDNA2008

  355. lovetox


  356. jonas’


  357. jonas’

    it’s idna2003

  358. jonas’

    not idna2008

  359. jonas’

    also note that nameprep has been deprecated in XMPP

  360. lovetox

    you just said nameprep has nothing to do with idna, its just a precondition

  361. lovetox

    so what is it now

  362. jonas’

    TIL that nameprep is a precondition to IDNA2003.

  363. jonas’

    it doesn’t matter tho

  364. jonas’

    IDNA2003 does more than just nameprep

  365. jonas’

    if you want nameprep, you should do nameprep and not IDNA2003

  366. Zash

    You actually want IDNA too, nameprep isn't enough to validate an XMPP hostname.

  367. Zash

    domain. hostpart. thing.

  368. jonas’

    Zash, IDNA doesn’t buy you much though: >>> codecs.encode("http://foo:5082", "idna") b'http://foo:5082'

  369. Zash

    See previously mentioned incident with someone having a HTTP URL in their config

  370. Zash


  371. jonas’


  372. jonas’

    it’s just nameprep plus some mapping of characters

  373. jonas’

    plus length restrictions

  374. Zash

    > print(util.encodings.idna.to_ascii("http://foo:123/")) nil

  375. jonas’

    is that IDNA2003 or IDNA2008?

  376. Zash

    Probably 2008

  377. jonas’

    might be the difference

  378. jonas’

    python3 only has 2003

  379. Zash


  380. jonas’


  381. Zash

    but don't python also have ... whatsitcalled, precis?

  382. jonas’

    the issue is just open for seven years now: https://bugs.python.org/issue17305

  383. jonas’

    Zash, not built-in

  384. jonas’

    there’s a third party module

  385. Zash

    better than nothing

  386. jonas’


  387. jonas’

    there also seems a third-party IDNA module which does things

  388. jonas’

    and then again: I’m not sure XMPP software should make assumptions about what DNS allows.

  389. lovetox

    : is not allowed in IDNA2008

  390. jonas’

    let DNS deal with the weird things we put in the domainpart.

  391. pulkomandy has left

  392. jonas’

    it’ll tell us to f* off. encoding (too many) assumptions about how DNS works and what it allows seems like it can only lead to a world of pain

  393. jonas’

    normalisation makes sense for comparision and stuff, but beyond that…

  394. Zash

    `idn -a <<< "http://foo.bar:123/"` spits out its input

  395. Zash

    and that would be idna2003

  396. lovetox

    so i still dont see no problem to run a host through idna 2008?

  397. pulkomandy has joined

  398. jonas’

    probably ok

  399. jonas’

    not sure what that gains you tho

  400. lovetox

    and if it returns an exception, tell the user its not a valid domain name

  401. jonas’

    I hate that type of stuff

  402. amnesia has left

  403. jonas’

    that’s the type of stuff which breaks new things

  404. jonas’

    you’ll notice that it’s not a valid domain name when you ask the DNS about the name

  405. jonas’

    (though, you need to do IDNA2008 or IDNA2003 before you ask the DNS)

  406. jonas’

    (but you can’t know which one is right \o/)

  407. Zash

    The least painful answer for us: IDNA2008 in IDNA2003 compat mode

  408. Zash

    IDNA2003 library support status: deprecated.

  409. lovetox

    so what does the xmpp standard say about domainpart

  410. Zash

    libidn v1 deprecated libin2 dosen't do nameprep & co, can't manage xmpp parts

  411. lovetox

    no validation at all?

  412. lovetox

    it does for node and resource part have precis modules

  413. Zash

    lovetox: "the", there are like 3 of them

  414. Zash

    3 versions

  415. lovetox

    the lastest

  416. Zash

    idna2003, idna2008, precis

  417. lovetox

    so wtf it definitly says a domainpart has to conform to idna2008

  418. lovetox

    so i certainly run it through idna2008 and be finished with it

  419. Zash

    Latest is https://tools.ietf.org/html/rfc7622

  420. lovetox

    yes thats what iam refering to

  421. jonas’

    I love how we still haven’t figured out how to do unicode release interop

  422. Zash

    This be the IDNA2008 + PRECIS thing righht?

  423. lovetox


  424. lovetox

    and idna2008 has no nameprep as precondition

  425. jonas’

    I dropped that in #debian-til and someone got nerdsniped by that and dug out that the unicode releases also don’t really have guidelines on compatibility

  426. lovetox

    so actually i can throw out all nameprep stuff

  427. Zash

    jonas’: No way we're doing that while in the middle of a pandemic, can't afford to waste painkillers and anti-fever meds on this horror

  428. jonas’


  429. jonas’

    luckily, the next unicode release will be postponed due to the pandemic, too

  430. Zash

    Praise Glob

  431. paul has left

  432. amnesia has joined

  433. pulkomandy has left

  434. pulkomandy has joined

  435. strar has left

  436. strar has joined

  437. pep. has left

  438. strar has left

  439. paul has joined

  440. strar has joined

  441. pep. has joined

  442. flow

    lovetox> so i certainly run it through idna2008 and be finished with it then you potentially disallow ipv4/ipv6 addresses in the domainpart, which are allowed

  443. lovetox

    after i check if its an ip :D

  444. flow

    lovetox, bonus points for allowing ipv6 scope IDs

  445. lovetox

    i do

  446. flow

    then here are your bonus points

  447. lovetox

    but only if you include it within []

  448. flow hands lovetox 13.37 bonus points

  449. flow

    lovetox, whatever the IP-literal rule of RFC 6874 allows

  450. Zash has left

  451. Zash has joined

  452. lovetox has left

  453. Jae has left

  454. Jae has joined

  455. wurstsalat has left

  456. wurstsalat has joined

  457. Jae has left

  458. Jae has joined

  459. DebXWoody has left

  460. asterix has left

  461. Jae has left

  462. Jae has joined

  463. asterix has joined

  464. Marc has left

  465. Marc has joined

  466. asterix has left

  467. alexis has joined

  468. Marc has left

  469. Marc has joined

  470. moparisthebest has left

  471. Jae has left

  472. paul has left

  473. paul has joined

  474. goffi has left

  475. alexis has left

  476. wurstsalat has left

  477. SouL has left

  478. alexis has joined

  479. Marc has left

  480. paul has left