mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-04 10:31:02 +02:00
Allow backslash and at-sign in user names, fix #171.
When connection to MS SQL it's sometimes needed to be able to use @ or \ as part of the username, which is now possible.
This commit is contained in:
parent
3c1f18f4f5
commit
b00e1bba7f
@ -25,14 +25,15 @@
|
||||
(defrule doubled-at-sign (and "@@") (:constant "@"))
|
||||
(defrule doubled-colon (and "::") (:constant ":"))
|
||||
(defrule password (+ (or (not "@") doubled-at-sign)) (:text t))
|
||||
(defrule username-string (and (or #\_ (alpha-char-p character))
|
||||
(* (or (alpha-char-p character)
|
||||
(digit-char-p character)
|
||||
#\.
|
||||
punct)))
|
||||
(:text t))
|
||||
|
||||
(defrule username (and username-string (? (or doubled-at-sign doubled-colon)))
|
||||
(defrule username (and (or #\_ (alpha-char-p character))
|
||||
(* (or (alpha-char-p character)
|
||||
(digit-char-p character)
|
||||
#\.
|
||||
#\\
|
||||
punct
|
||||
doubled-at-sign
|
||||
doubled-colon
|
||||
)))
|
||||
(:text t))
|
||||
|
||||
(defrule dsn-user-password (and username
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user