æ°é±éåã«ã
django-registration 2.4.1ããªãªãŒã¹ããŸããã ãã«ã2.4.xã¯django-registration 2.xããŒãžã§ã³ã®æåŸã§ããã次ã«ãã°ä¿®æ£ã®ã¿ãè¡ãããŸãã çŸåšãã¡ã€ã³ãã©ã³ãã¯ããŒãžã§ã³3.0ã®æºåãé²ããŠãããéå»10幎éã®ãµããŒãã§èç©ããã倧éã®äžèŠãªãžã£ã³ã¯ãåé€ããäºå®ã§ããææ°ã®Djangoã¢ããªã±ãŒã·ã§ã³ã®ãã¹ããã©ã¯ãã£ã¹ãèæ
®ã«å
¥ããŸãã
è¿ãå°æ¥ãæ°ããããŒãžã§ã³ã«ã€ããŠè©³ãã説æããŸãããä»ã¯å¯ŸåŠããªããã°ãªããªãäžèŠåçŽãªåé¡ã«ã€ããŠå°ãã話ããããšæããŸãã ãããã¯ãŠãŒã¶ãŒåã§ãã ã¯ãã
ãããã°ã©ããŒã®Xã«é¢ãã誀解ãã®ãããªäººæ°ã®ããèšäºã®1ã€ãæžãããšã¯ã§ããŸãããããããªããããèŠãããããè€éãªã®ããæ¬åœã«èª¬æããåé¡ã解決ããæ¹æ³ã«ã€ããŠã®ãã³ããæäŸããããšã奜ã¿ãŸãã ãããŠãæçšãªã³ã³ããã¹ããªãã§åè«ãèšãã ãã§ã¯ãããŸããã
åèïŒèå¥ããæ£ããæ¹æ³
ãŠãŒã¶ãŒå-å€ãã®ãµã€ãããµãŒãã¹ãããã³å€ãã®äžè¬çãªãã¬ãŒã ã¯ãŒã¯ïŒDjangoãå«ãïŒã§å®è£
ãããŠãã圢åŒã§ã¯ããŠãŒã¶ãŒã®å©ããåããŠè§£æ±ºããããšããŠããåé¡ã解決ããã«ã¯ãã»ãŒééããªãééã£ãæ¹æ³ã§ãã ãŠãŒã¶ãŒèå¥ã«é¢ããŠæ¬åœã«å¿
èŠãªã®ã¯ã次ã®ããã€ãã®çµã¿åããã§ãã
- ããŒã¿ããŒã¹å
ã®å€éšããŒã®ã·ã¹ãã ã¬ãã«èå¥åã
- è³æ Œæ
å ±ã®æ€èšŒãå®è¡ããããã®ãã°ã€ã³IDã
- ä»ã®ãŠãŒã¶ãŒã«è¡šç€ºããå
¬éèå¥åã
å€ãã®ã·ã¹ãã ã¯ãŠãŒã¶ãŒåãèŠæ±ããããã3ã€ã®ã¿ã¹ã¯ãã¹ãŠã«åããŠãŒã¶ãŒåã䜿çšããŸãã ããã¯ããããééã£ãŠããŸãã ããæèœãªã¢ãããŒãã¯ãåèå¥åãç°ãªããè€æ°ã®ãã°ã€ã³èå¥åããã³/ãŸãã¯å
¬éèå¥åã1ã€ã®ã·ã¹ãã èå¥åã«é¢é£ä»ããããšãã§ãã
3æ¹åã®èå¥ãã³ãã¬ãŒãã§ãã
ã¢ã«ãŠã³ãã·ã¹ãã ãæ§ç¯ããã³æ¡åŒµããããšããéã®å€ãã®åé¡ãšèŠãã¿ã¯ããã®ã¢ãã«ãç¡èŠããããšã«èµ·å ããŸãã è¿·æãªã»ã©å€ãã®ããã¯ãã
ãã®ãããªãã¿ãŒã³ããµããŒãããŠ
ããªãã·ã¹ãã ã§äœ¿çšãããŠãããããããããããããµããŒãããŠãããã®ããã«èŠããŠåäœããŸãã
ãããã£ãŠã2018幎ã«ã·ã¹ãã ããŒãããéçºããŠããå Žåã¯ããã®ã¢ãã«ãããŒã¹ãšããŠäœ¿çšããããšããå§ãããŸãã æåã¯å°ãäœæ¥ããå¿
èŠããããŸãããå°æ¥çã«ã¯åªããæè»æ§ãšæéã®ç¯çŽãåŸããããã€ã誰ããåå©çšå¯èœãªäœ¿çšã®ããã®èš±å®¹å¯èœãªãŠãããŒãµã«å®è£
ãäœæããããšããã§ããŸãïŒãã¡ãããDjangoã®ããã«ãããè¡ããããã€ããããè¡ããããããŸããïŒã
ãã®èšäºã®æ®ãã®éšåã§ã¯ãäžæã®ãŠãŒã¶ãŒåãå°ãªããšãã·ã¹ãã èå¥åãšããŠæ©èœããã·ã¹ãã ãžã®ãã°ã€ã³ãšãã»ãšãã©ã®å Žåãã¹ãŠã®ãŠãŒã¶ãŒã«è¡šç€ºããããããªãã¯èå¥åãšããŠæ©èœãããããäžè¬çãªå®è£
ã䜿çšããŠãããšæ³å®ããŸãã ãããŠãããŠãŒã¶ãŒåããšã¯ãæ¬è³ªçã«ä»»æã®æååèå¥åãæå³ããŸãã ããšãã°ãRedditãHacker Newsãªã©ã®ãã©ãŒã©ã ã®ãããªãŠãŒã¶ãŒåã䜿çšããããã¡ãŒã«ã¢ãã¬ã¹ãä»ã®äžæã®è¡ã䜿çšãããã§ããŸãã éèŠã§ã¯ãããŸãããããããã
äœããã®çš®é¡ã®äžæã®æååã䜿çšããŠããå¯èœæ§ããããŸãã ãããã£ãŠãããã€ãã®åé¡ã«ã€ããŠç¥ãå¿
èŠããããŸãã
äžææ§ã¯èŠãç®ãããé£ãã
ããããããªãã¯è³ªåãããŸãïŒããã¯ã©ãã»ã©é£ããã§ããïŒ ããŒã¿ããŒã¹ã«äžæã®åãäœæããã ãã§å®äºã§ãïŒ Postgresã®ãŠãŒã¶ãŒã§ããŒãã«ãäœæããŸãããïŒ
CREATE TABLE accounts ( id SERIAL PRIMARY KEY, username TEXT UNIQUE, password TEXT, email_address TEXT );
以äžã«ããŠãŒã¶ãŒãšäžæã®ååã®åãå«ãè¡šã瀺ããŸãã ç°¡åïŒ
å®éã®ã¢ããªã±ãŒã·ã§ã³ã«ã€ããŠèãå§ãããŸã§ã¯ç°¡åã§ãã
john_doe
ãšããŠç»é²ãããŠããå Žåã
JOHN_DOE
ãšããŠç»é²ãããš
JOHN_DOE
ãŸããïŒ ããã¯å¥ã®ãŠãŒã¶ãŒåã§ãããèªåãããªãã ãšæãããããšã¯ã§ããŸããïŒ å人ã®ãªã¯ãšã¹ããåãå
¥ããæ©å¯æ
å ±ãç§ãšå
±æããã®ã¯ãã³ã³ãã¥ãŒã¿ãŒã®å Žåã¯å€§æåãšå°æåãç°ãªãããšã«æ°ä»ããªãããã§ãã
ããã¯ãå€ãã®ã·ã¹ãã ã§æ£ããå®è£
ãããŠããªãåçŽãªããšã§ãã ãã®èšäºã®èª¿æ»äžã«ãDjangoã®èªèšŒã·ã¹ãã ã¯ãä»ã®å€ãã®ããšãå®è£
ããæ£ããã¢ãããŒãã«ããããããã倧æåãšå°æåãåºå¥ããªããŠãŒã¶ãŒåãæäŸããªãããšãããããŸããã ãã°ãã©ãã«ãŒã«ã¯ãŠãŒã¶ãŒåã®å€§æåãšå°æåãåºå¥ããªããã±ããããããŸããã倧æåãšå°æåãåºå¥ããªããŠãŒã¶ãŒåãäžæ¬ã§äœæãããšäžäœäºææ§ã倱ããããããWONTFIXãšããŠããŒã¯ãããŸãã ã ç§ã¯ããããdjango-registration 3.0ã§ããã匷å¶ããããšãèããŸããããããããã«å®è£
ã§ãããã©ããã¯ããããŸããã倧æåãšå°æåãåºå¥ããã¢ã«ãŠã³ããæ¢ã«ååšãããµã€ãã§åé¡ãçºçããŸãã
ãããã£ãŠãä»æ¥ã·ã¹ãã ããŒãããæ§ç¯ããããšãèšç»ããŠããå ŽåãæåãããŠãŒã¶ãŒã®ãŠãŒã¶ãŒåã®äžææ§ãã§ãã¯ãè¡ãå¿
èŠããããŸã
john_doe
ã
John_Doe
ãããã³
JOHN_DOE
ã¯åãååãšèŠãªãããå¿
èŠããããŸãã ãããã®ãããããç»é²ããããšãæ®ãã¯ã¢ã¯ã»ã¹ã§ããªããªããŸãã
ããããããã¯ã»ãã®å§ãŸãã«éããŸããã ç§ãã¡ã¯ãŠãã³ãŒãã®äžçã«äœãã§ãããããã§ã¯ãæäœ
username1 == username2
ãåã«å®è¡ããããããäžèŽãã2ã€ã®ååãæ¯èŒããã®ãå°é£ã§ãã ãŸãããã£ã©ã¯ã¿ãŒã®æ§æãšå解ããããŸãã ããããUnicodeã³ãŒããã€ã³ãã®ã·ãŒã±ã³ã¹ãšããŠæ¯èŒããå Žåã¯ç°ãªããŸãããç»é¢äžã§ã¯åãããã«èŠããŸãã ãããã£ãŠãããã§ã¯æ£èŠåã«ã€ããŠèããæ£èŠåãã©ãŒã ïŒNFCãŸãã¯NFDïŒãéžæããäžææ§ãã§ãã¯ãå®è¡ãã
åã«åãŠãŒã¶ãŒåãéžæãããã©ãŒã
ã« æ£èŠåããå¿
èŠããããŸãã
ãUnicodeã®æ£èŠåããšããèšäºã®å³-çŽ ããããŸãã倧æåãšå°æåãåºå¥ããªãååã®äžææ§ããã§ãã¯ããã·ã¹ãã ãéçºãããšãã¯ãASCIIã«å«ãŸããŠããªãæåãèæ
®ããå¿
èŠããããŸãã
StraÃburgJoe
ãš
StrassburgJoe
ãŠãŒã¶ãŒåã¯åäžãšèŠãªãããŸããïŒ çãã¯ãå€ãã®å Žåãå°æåã§æ£èŠåããŠãã§ãã¯ãããã倧æåã§ãã§ãã¯ãããã«ãã£ãŠç°ãªããŸãã ãŸããUnicodeã§ã®å解ã«ã¯ãŸã ããŸããŸãªãªãã·ã§ã³ããããŸãã æ£èŠç䟡ã¢ãŒãã䜿çšãããäºæã¢ãŒãã䜿çšãããã«å¿ããŠãå€ãã®è¡ã§ç°ãªãçµæãååŸïŒããã³ååŸïŒã§ããŸãã
ããããã¹ãŠçŽããããå Žå-ãããŠãUnicodeã®å°é家ã§ãã£ãŠãããã§ãïŒ
-Unicode Technical Report 36ã®
ã¢ããã€ã¹ã«åŸãã
NFKCãã©ãŒã ã®ååãæ£èŠåããããšããå§ãããŸãã DjangoãŸãã¯ãã®ãµãã¯ã©ã¹ã§
UserCreationForm
ã䜿çšããå ŽåïŒdjango-registrationã¯
UserCreationForm
ãµãã¯ã©ã¹ã䜿çšããŸãïŒãããã¯æ¢ã«è¡ãããŠããŸãã Pythonã䜿çšããDjangoã䜿çšããªãïŒãŸãã¯
UserCreationForm
䜿çšããªãïŒå Žåãããã¯æšæºã©ã€ãã©ãªã®ãã«ããŒã䜿çšããŠ1è¡ã§å®è¡ã§ããŸãã
import unicodedata username_normalized = unicodedata.normalize('NFKC', username)
ä»ã®èšèªã«ã€ããŠã¯ãåªããUnicodeã©ã€ãã©ãªãæ¢ããŠãã ããã
ããããæ¬åœã«ãäžææ§ã¯èŠãç®ãããé£ããã§ã
æ®å¿µãªãããããã ãã§ã¯ãããŸããã æ£èŠåãããæååã®å€§æåãšå°æåãåºå¥ããªãäžææ§ãã§ãã¯ãå§ãŸãã§ããããã£ããããå¿
èŠããããã¹ãŠã®ã±ãŒã¹ãã«ããŒããŠããããã§ã¯ãããŸããã ããšãã°ã次ã®ãŠãŒã¶ãŒå
jane_doe
ãŸãã 次ã«ãå¥ã®ãŠãŒã¶ãŒå
jane_doe
æ€èšããŸãã ããã¯åããŠãŒã¶ãŒåã§ããïŒ
ãã®èšäºã§äœ¿çšãããã©ã³ããšãããã°ã§äœ¿çšå¯èœãªãã©ã³ãã§ã¯ãããã
ã¯åã
ããã«èŠããŸãã ãã ãããœãããŠã§ã¢ã®å Žåããããã¯å®å
šã«
ç°ãªã ãUnicodeã®æ£èŠåããã³å€§æåãšå°æåãåºå¥ããªãæ¯èŒã®åŸãå€ãããŸããïŒæ£èŠåãå°æåãŸãã¯å€§æåã§ãã§ãã¯ãããã©ããã«é¢ä¿ãªãïŒã
çç±ãç解ããã«ã¯ã2çªç®ã®ã³ãŒããã€ã³ãã«æ³šæããŠãã ããã ãŠãŒã¶ãŒåã®1ã€ã§ã¯ãããã¯
U+0061 LATIN SMALL LETTER A
å¥ã®äŸã§ã¯ã
U+0430 CYRILLIC SMALL LETTER A
ãŸããUnicodeã®æ£èŠåã倧æåãšå°æåã®åºå¥ããªãããŠãããããã®ã³ãŒããã€ã³ãã¯åãã«ãªããŸãããèŠèŠçã«ã¯å®å
šã«åºå¥ã§ããŸããã
ããã¯ã
åœéåãã¡ã€ã³åã®ã³ã³ããã¹ãã§æåã«åºãç¥ããããã¢ã°ã©ãã£ãã¯æ»æã®åºç€ã§ãã ãããŠåé¡ã解決ããã«ã¯ãããå°ãæéãããããŸãã
ãããã¯ãŒã¯ãã¹ãã®å Žåã1ã€ã®è§£æ±ºçã¯ã
Punycodeãã¥ãŒã«ååã衚瀺ããããšã§ããããã¯ãASCIIæåã®ã¿ã䜿çšãããšã³ã³ãŒãã£ã³ã°ã§ååã衚瀺ããããšã§ãã®ç¹å®ã®åé¡ã解決ããããã«äœæãããŸãã äžèšã®ãŠãŒã¶ãŒåã«æ»ããšããããã®éããæããã«ãªããŸãã èªåã§è©ŠããŠã¿ããå Žåã¯ãPythonã®ã¯ã³ã©ã€ããŒãšãããªã«æåã䜿çšãããŠãŒã¶ãŒåã®çµæã次ã«ç€ºããŸãã
>>> 'jne_doe'.encode('punycode') b'jne_doe-2fg'
ïŒ
j\u0430ne_doe
éASCIIæåã®
j\u0430ne_doe
åé¡ãããå Žåããã®ååã¯æååãªãã©ã«
j\u0430ne_doe
ãšããŠè¡šçŸã§ããŸãïŒã
ãã ãããã®åœ¢åŒã§ãŠãŒã¶ãŒåã衚瀺ããããšã¯å®éã«ã¯å®çšçã§ã¯ãããŸããã ãã¡ãããPunycodeãæ¯å衚瀺ã§ããŸãããããã«ãããéASCIIæåãå«ãå€ãã®å®å
šã«éåžžã®ãŠãŒã¶ãŒåã®è¡šç€ºãå£ããŸãã æ¬åœã«
欲ããã®ã¯ãç»é²æã«äžèšã®ãŠãŒã¶ãŒåãæåŠããããš
ã§ã ã ã©ããã£ãŠããã®ïŒ
ããŠãä»åã¯
Unicodeãã¯ãã«ã«ã¬ããŒã39ã«é²ã¿ãã»ã¯ã·ã§ã³4ãš5ãèªã¿å§ããŸããäºãã«ç°ãªãïŒæ£èŠååŸã§ãïŒããæ··åãããŠãèŠèŠçã«åäžãŸãã¯é¡äŒŒã®ã³ãŒããã€ã³ãã®ã»ããã¯ãæ··ä¹±ãïŒæ··ä¹±ïŒãããã³Unicodeã¯ããã®ãããªã³ãŒããã€ã³ããæ€åºããã¡ã«ããºã ãæäŸããŸãã
ãã®äŸã®ãŠãŒã¶ãŒåã¯ãUnicodeããæ··åã¹ã¯ãªããæ··åå¯èœããšåŒã¶ãã®ã§ããããããç§ãã¡ãçºèŠããããã®ã§ãã èšãæãããšããŠãŒã¶ãŒåã¯å®å
šã«ã©ãã³èªã§ãçŽãããããæåãå«ãã§ãããããããéåžžã®æåãšèããããŸãã ãŸãããçŽãããããæåãå«ãå®å
šãªããªã«æåã®ãŠãŒã¶ãŒåã¯ãããããéåžžã®ãã®ãšèŠãªãããšãã§ããŸãã ããããååãäž»ã«ã©ãã³æåãšãèŠèŠåãããšæ··ååã«ã©ãã³æåã®ããã«ãªã£ãå¯äžã®ããªã«æåã³ãŒããã€ã³ãã§æ§æãããŠããå Žåãããã¯æ©èœããŸããã
æ®å¿µãªãããPythonæšæºã©ã€ãã©ãªã¯ããã®ãããªæ¯èŒãè¡ãããã«Unicodeããããã£ãšããŒãã«ã®å®å
šãªã»ããã«å¿
èŠãªã¢ã¯ã»ã¹ãæäŸããŸããã ãããã
Victor Felderãšãã芪åãªéçºè
ã
é©åãªã©ã€ãã©ãªãäœæããç¡æã®ãªãŒãã³ãœãŒã¹ã©ã€ã»ã³ã¹ã§ãªãªãŒã¹ããŸããã
confusable_homoglyphs
ã©ã€ãã©ãªã䜿çšããŠãåé¡ãç¹å®ã§ããŸãã
>>> from confusable_homoglyphs import confusables >>> s1 = 'jane_doe' >>> s2 = 'j\u0430ne_doe' >>> bool(confusables.is_dangerous(s1)) False >>> bool(confusables.is_dangerous(s2)) True
2çªç®ã®ãŠãŒã¶ãŒåã«å¯ŸããŠ
is_dangerous()
é¢æ°ãå®è¡ããå®éã®çµæã¯ãæœåšçãªåé¡ã«é¢ãã詳现æ
å ±ãå«ãããŒã¿æ§é ã§ãããäž»ãªããšã¯ãæ··åãæãã¢ã«ãã¡ããããšã³ãŒããã€ã³ããæ··åšããæååãèå¥ã§ããããšã§ãã ãããå¿
èŠãªãã®ã§ãã
Djangoã§ã¯ããŠãŒã¶ãŒåã«éASCIIæåã䜿çšã§ããŸãããç°ãªããšã³ã³ãŒãã£ã³ã°ã®åäžã®æåã¯ãã§ãã¯ããŸããã ãã ããããŒãžã§ã³2.3以éãdjango-registrationã¯
confusable_homoglyphs
ã©ã€ãã©ãªã«äŸåãã
confusable_homoglyphs
ããã®
is_dangerous()
é¢æ°ã¯ãŠãŒã¶ãŒåãšé»åã¡ãŒã«ã¢ãã¬ã¹ã®æ€èšŒããã»ã¹ã§äœ¿çšãããŸãã DjangoïŒãŸãã¯äžè¬ã«PythonïŒã§ãŠãŒã¶ãŒç»é²ãå®è£
ããå¿
èŠããããdjango-registrationã䜿çšã§ããªãããŸãã¯äœ¿çšããããªãå Žåã¯ã
confusable_homoglyphs
ã©ã€ãã©ãªãåãæ¹æ³ã§äœ¿çšããããšããå§ãããŸãã
äžææ§ãéæããã®ã¯é£ãããšèšããŸãããïŒ
æ··ä¹±ãæãUnicodeã³ãŒããã€ã³ããæ±ã£ãŠããå Žåã
åãã¢ã«ãã¡ãããã®é¡äŒŒæåãã©ãåŠçããããèããã®ã¯çã«ããªã£ãŠããŸãã ããšãã°ã
paypal
ããã³
paypa1
ã äžéšã®ãã©ã³ãã§ã¯ãäºãã«åºå¥ããã®ãå°é£ã§ãã ãããŸã§ãç§ã®ææ¡ã¯ãã¹ãŠäžè¬ã«é©ããŠããŸãããããã§ã¯ç¹å®ã®èšèªãã¢ã«ãã¡ããããããã³å°ççå°åã«åºæã®é åãå
¥åããŠããŸãã ããã§ã¯ãæ
éã«æ±ºå®ãäžããèµ·ããããçµæãèæ
®ã«å
¥ããå¿
èŠããããŸãïŒããšãã°ã誀解ãæãã©ãã³æåã®çŠæ¢ã¯ãããªããæããããå€ãã®èª€æ€ç¥çµæãåŒãèµ·ããå¯èœæ§ããããŸãïŒã èãã䟡å€ããããŸãã åãããšã¯ãç°ãªããäºãã«éåžžã«é¡äŒŒããŠãããŠãŒã¶ãŒåã«ã€ããŠãèšããŸãã ããŒã¿ããŒã¹ã¬ãã«ã§ã¯ãããŸããŸãªåœ¢åŒã§ãã§ãã¯ã€ã³ã§ããŸã-ããšãã°ãPostgresã«ã¯
Soundexããã³
Metaphoneã®ãµããŒããå«ãŸãã
Levenshteinã®è·é¢ãš
ãã¡ãžãŒãããã³ã°ããªã°ã©ã ã®ãµããŒãããããŸã-ãã ããããã¯ã±ãŒã¹
ããšã«è¡ãå¿
èŠããããåžžã«ã§ã¯ãããŸããã
ååã®äžææ§ã«é¢ããå¥ã®åé¡ã«èšåããããšæããŸãã 確ãã«ãããã¯äž»ã«é»åã¡ãŒã«ã¢ãã¬ã¹ãæããŸããããã¯çŸåšããŠãŒã¶ãŒåãšããŠãã䜿çšãããŸãïŒç¹ã«ããµãŒãããŒãã£ã®IDãããã€ããŒã«äŸåããOAuthããã³åæ§ã®ãããã³ã«ã䜿çšãããµãŒãã¹ã§ïŒã é»åã¡ãŒã«ã¢ãã¬ã¹ãäžæã§ããããšã確èªããå¿
èŠããããšããŸãã 以äžã«ãªã¹ããããŠããã¢ãã¬ã¹ã®æ°ã¯ããã€ã§ããïŒ
johndoe@example.com
johndoe+yoursite@example.com
john.doe@example.com
æ確ãªçãã¯ãããŸããã ã»ãšãã©ã®ã¡ãŒã«ãµãŒããŒã¯ããŠãŒã¶ãŒåã決å®ãããšãã«ãã¢ãã¬ã¹ã®ããŒã«ã«éšåã®
+
èšå·ã®åŸã®ãã¹ãŠã®æåãé·ãéç¡èŠããŠããŸããã 次ã«ãå€ãã®äººããã®æè¡æ©èœã䜿çšããŠãã©ãã«ãšãã£ã«ã¿ãªã³ã°ã®
ç¹å¥ãªã·ã¹ãã ãšããŠããã©ã¹ãã®åŸã«ä»»æã®ããã¹ãã瀺ããŸãã ãŸããGmailã¯ãããïŒ
.
ïŒãç¡èŠããããšã§ãæå
.
ãµãŒãã¹ã®åæ£ãã¡ã€ã³ãå«ãããŒã«ã«éšåã§ã¯ãDNSã¯ãšãªããªããšãäžè¬ã«å€éšã¡ãŒã«ãµãŒããŒ
johndoe
ãš
john.doe
johndoe
åºå¥ãããã©ãããç解ã§ããŸã
john.doe
ã
ãããã£ãŠãäžæã®é»åã¡ãŒã«ã¢ãã¬ã¹ãå¿
èŠãªå ŽåããŸãã¯é»åã¡ãŒã«ã¢ãã¬ã¹ããŠãŒã¶ãŒIDãšããŠäœ¿çšããå Žåã¯ãäžææ§ãã§ãã¯ãå®è¡ããåã«ãããããããŒã«ã«éšåãããã¹ãŠã®ãã€ã³ããš
+
ããã³ãã®åŸã®ããã¹ããåé€ããå¿
èŠããããŸãã çŸåšãdjango-registrationã¯ãããè¡ããŸããããããŒãžã§ã³3.xã§ãã®æ©èœãè¿œå ããèšç»ããããŸãã
ããã«ãã¡ãŒã«ã¢ãã¬ã¹ã®æ··ä¹±ãæãUnicodeã³ãŒããã€ã³ããåŠçããå Žåã¯ããã®ãã§ãã¯ãããŒã«ã«éšåãšãã¡ã€ã³ã«
å¥ã
ã«é©çšããŠãã ããã ãã¡ã€ã³ã§äœ¿çšãããŠããã¢ã«ãã¡ããããåžžã«å€æŽã§ãããšã¯éããªããããããŒã«ã«éšåãšãã¡ã€ã³éšåã§ç°ãªãã¢ã«ãã¡ãããã䜿çšããããšã§çœ°ããããããšã¯ãããŸããã ããŒã«ã«éšåããã¡ã€ã³ã®äžéšããæ··ä¹±ãæãã¢ã«ãã¡ãããã®æ··åç©ãåå¥ã«å«ãã§ããªãå Žåããããããã¹ãŠãæ£åžžã§ãïŒãããŠãdjango-registrationããªããŒã¿ãŒããã®ãã§ãã¯ãè¡ããŸãïŒã
äºãã«ããŸãã«ã䌌ãŠããããã«ãç°ãªãããšèŠãªãããªãããã«ããŠãŒã¶ãŒåã«é¢ããä»ã®å€ãã®åé¡ãçºçããå¯èœæ§ããããŸããã倧æåãšå°æåã®åºå¥ããªãã«ããæ£èŠåãéå§ããŠã¢ã«ãã¡ãããã®æ··åã確èªããããã«é åã«å
¥ããšããã«åçã®æžå°[ã€ãããŒã·ã§ã³ããšã«å©çãæžå°ããå Žå-
çŽ ããã ]ãç¹ã«ãèšèªãã¢ã«ãã¡ãããããŸãã¯å°åã«äŸåããå€ãã®ã«ãŒã«ãé©çšãããããã§ãã ããã¯ããããã«ã€ããŠèããå¿
èŠããªããšããæå³ã§ã¯ãããŸããã 誰ã«ã§ãé©ããæ®éçãªã¢ããã€ã¹ãããã®ã¯é£ãããšããã ãã§ãã
ç¶æ³ãå°ãåºããŠãå¥ã®ã¿ã€ãã®åé¡ãèããŠã¿ãŸãããã
äžéšã®ååã¯äºçŽããå¿
èŠããããŸãã
å€ãã®ãµã€ãã§ã¯ããã°ã€ã³ãã©ãŒã ã®ãã£ãŒã«ããšããŠã ãã§ãªãããŠãŒã¶ãŒåã䜿çšããŠããŸãã äžéšã®ãŠãŒã¶ãŒã¯ãåãŠãŒã¶ãŒã®ãããã¡ã€ã«ããŒãžãäœæããURLã«ãŠãŒã¶ãŒåãå
¥åããŸãã ãŠãŒã¶ãŒããšã«ã¡ãŒã«ã¢ãã¬ã¹ãäœæãããã®ããããŸãã ãµããã¡ã€ã³ãäœæãããã®ããããŸãã ãã®ãããããã€ãã®è³ªåãçºçããŸãã
- ãµã€ãã§ãããã¡ã€ã«ããŒãžã®URLã«ãŠãŒã¶ãŒåãå
¥åããå Žåã
login
ãšããååã®ãŠãŒã¶ãŒãäœæãããšã©ããªãlogin
ãïŒ èªåã®ãããã¡ã€ã«ã«ããã°ã€ã³ããŒãžã移åãããŸããããã°ã€ã³ããã«ã¯ãããã¯ãªãã¯ããŠãã ããããšããããã¹ããšãè³æ Œæ
å ±åéãµã€ããžã®ãªã³ã¯ãæçš¿ããŠãã ããã äœäººã®ãŠãŒã¶ãŒãç§ãã ãŸãããšãã§ãããšæããŸããïŒ - ãµã€ãããŠãŒã¶ãŒåããé»åã¡ãŒã«ã¢ãã¬ã¹ãäœæããå Žåã
webmaster
ãŸãã¯postmaster
ãšããååã®ãŠãŒã¶ãŒãšããŠç»é²ãããšã©ãpostmaster
ãŸããïŒ ãã¡ã€ã³ã®ãããã®ã¢ãã¬ã¹å®ã®ã¡ãŒã«ãåä¿¡ããŸããïŒ æ£ãããŠãŒã¶ãŒåãšèªåçæãããã¡ãŒã«ã¢ãã¬ã¹ã§ãã¡ã€ã³ã®SSL蚌ææžãååŸã§ããŸããïŒ - ãµã€ãããŠãŒã¶ãŒåãããµããã¡ã€ã³ãäœæããå Žåã
www
ãšããååã®ãŠãŒã¶ãŒãšããŠç»é²ãããšã©ããªããŸããïŒ ãŸãã¯smtp
ããŸãã¯mail
ïŒ
ããããåãªã銬鹿ãã仮説çãªè³ªåã ãšæããªãã
å®éã«ã¯ãã®ãããªããšãèµ·ãã£ãŠããŸãã ãããŠäžåºŠã§ã¯ãªãã
æ°å ã ããããå®éã
ãã®ãããªããšãäœåºŠãèµ·ãããŸãã ã
ãŠãŒã¶ãŒã¢ã«ãŠã³ãçšã«èªåçã«äœæããããµããã¡ã€ã³ããå®éã«äœããã®ç®çã§äœ¿çšããŠããæ¢åã®ãµããã¡ã€ã³ãšç«¶åããªãããã«ããããã«ãããã€ãã®äºé²æªçœ®ãè¬ããããšãã§ããŸãã ãŸãã¯ãèªåçæãããé»åã¡ãŒã«ã¢ãã¬ã¹ãéèŠãªã¢ãã¬ã¹ãæ¢åã®ã¢ãã¬ã¹ãšç«¶åããªãããšã
ãã ããæ倧éã®ã»ãã¥ãªãã£ã確ä¿ããã«ã¯ãç¹å®ã®ãŠãŒã¶ãŒåãç»é²ãããªãããã«ããå¿
èŠããããŸãã
Jeffrey Thomasã«ãããã®èšäºã§ã
ãã®ãããªã¢ããã€ã¹ãšäºçŽåã®ãªã¹ããããã³äžèšã®æåã®2ã€ã®èšäºãç®ã«ããã®ã¯åããŠã§ãã ããŒãžã§ã³2.1以éãdjango-registrationã«ã¯äºçŽåã®ãªã¹ããä»å±ããŠããããã®ãªã¹ãã¯ããŒãžã§ã³ããšã«å€§ãããªããŸãã çŸåšãçŽ100ã®ãšã³ããªããããŸãã
django-registrationãªã¹ãã§ã¯ãååã¯ããã€ãã®ã«ããŽãªã«åå²ãããŠãããå¿
èŠã«å¿ããŠãããã®ãµãã»ãããäœæã§ããŸãïŒããªããŒã¿ã¯ããã©ã«ãã§ãã¹ãŠãé©çšããŸãããæå®ãããäºçŽåã®å¿
èŠãªã»ããã®ã¿ã§åæ§æã§ããŸãïŒïŒ
- æ¢ç¥ã®ãµãŒãã¹ã®èªåæ€åº/èªåæ§æã«äœ¿çšããããã¹ãã¢ãã¬ã¹ã
- äžè¬çã«äœ¿çšããããããã³ã«ã«é¢é£ä»ããããŠãããã¹ãã¢ãã¬ã¹ã
- ãã¡ã€ã³æææš©ã確èªããããã«èªèšŒå±ã䜿çšããã¡ãŒã«ã¢ãã¬ã¹ã
- ä»ã®äºçŽåã®ã»ããã«ãªã¹ããããŠããªãã RFC 2142ã«ãªã¹ããããŠããé»åã¡ãŒã«ã¢ãã¬ã¹ã
- å
±éã¢ãã¬ã¹ã¯è¿ä¿¡ãªã@ã
- æ©å¯ãã¡ã€ã«åã«äžèŽããè¡ïŒã¯ãã¹ãã¡ã€ã³ã¢ã¯ã»ã¹ããªã·ãŒãªã©ïŒã
contact
ãlogin
ãããªä»ã®æœåšçã«æ©å¯æ§ã®é«ãååã®é·ããªã¹ãã
django-registrationããªããŒã¿ãŒã¯ã
RFC 5785æšæºã䜿çšã
㊠ãæ¢ç¥ã®URIãã瀺ããã¹ãŠãä¿è·ããããã«ã
.well-known
ã§å§ãŸããŠãŒã¶ãŒåãæåŠããŸãã
ãŠãŒã¶ãŒåã®æ··ä¹±ãæãæåã®å Žåãšåæ§ã«ãdjango-registrationãªã¹ãã®å¿
èŠãªèŠçŽ ãã³ããŒããå¿
èŠã«å¿ããŠè¿œå ããããšããå§ãããŸãã åæ§ã«ããã®ãªã¹ãã¯Jeffrey Thomasãªã¹ãã®æ¡åŒµããŒãžã§ã³ã§ãã
ããã¯ã»ãã®å§ãŸãã«éããŸããã
ãŠãŒã¶ãŒåããã¹ãããããã«ã§ããããšã®ãã¹ãŠãããã«ãªã¹ããããŠããããã§ã¯ãããŸããã å®å
šãªãªã¹ããäœæããããšãããšãç§ã¯æ°žé ã«ããã«ãšã©ãŸããŸãã ãã ããããã¯åªããéå§ãã©ãããã©ãŒã ã§ããããããã®ãã³ãã®ã»ãšãã©ãŸãã¯ãã¹ãŠã«åŸãããšããå§ãããŸãã ãã®èšäºãããŠãŒã¶ãŒã¢ã«ãŠã³ãã®ãããªäžèŠãåçŽãªãåé¡ã®èåŸã«ã©ã®ãããªå°é£ãé ãããŠãããããããã瀺ããããšãé¡ã£ãŠããŸãã
ãã§ã«è¿°ã¹ãããã«ãDjangoããã³/ãŸãã¯django-registrationã¯ãã§ã«ãããã®ãã§ãã¯ã®ã»ãšãã©ãå®è¡ããŠããŸãã ãããŠãå°ãªããšãããŒãžã§ã³django-registration 3.0ã§ã¯ããããäœãããªãã§ãããã Djangoèªäœã¯ãåŸæ¹äºææ§ã®åé¡ã匷ããããè¿ãå°æ¥ïŒãŸãã¯ãããŸã§ã«ïŒãã®ãããªãã§ãã¯ãå®è£
ã§ããªãå ŽåããããŸãã ãã¹ãŠã®ãœãŒã¹ã³ãŒãã¯ïŒBSDã©ã€ã»ã³ã¹ã«åºã¥ããŠïŒãªãŒãã³ã§ãããããåé¡ãªãã³ããŒãæ¹å€ãããã³æ¹åããŠãã ããã
éèŠãªãã®ãèŠéããå Žåã¯ããç¥ãããã ããããã°ãå ±åãããããã«ãªã¯ãšã¹ãã
GitHubã®django-registrationã«éä¿¡ãããã
çŽæ¥ç§ã«é£çµ¡ããŠãã ãã ã