Skip to content

Commit c37d354

Browse files
committed
Merge branch 'main' into osun/export-env-options-for-loading-field-desc
2 parents 5d49dae + 1638987 commit c37d354

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
with:
2626
fetch-depth: 1
2727
- name: Install go
28-
uses: actions/setup-go@v4
28+
uses: actions/setup-go@v5
2929
with:
3030
go-version: ${{ matrix.go-version }}
3131
- name: Test

.github/workflows/conformance.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
with:
2525
fetch-depth: 1
2626
- name: Install go
27-
uses: actions/setup-go@v4
27+
uses: actions/setup-go@v5
2828
with:
2929
go-version: ${{ matrix.go-version }}
3030
- name: Test conformance

celext/lib.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ func (l lib) uniqueBytes(list traits.Lister) ref.Val {
375375

376376
func (l lib) validateEmail(addr string) bool {
377377
a, err := mail.ParseAddress(addr)
378-
if err != nil || strings.ContainsRune(addr, '<') {
378+
if err != nil || strings.ContainsRune(addr, '<') || a.Address != addr {
379379
return false
380380
}
381381

celext/lib_test.go

+16
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,22 @@ func TestCELLib(t *testing.T) {
177177
"'1.2.3.0/24'.isIpPrefix(6)",
178178
false,
179179
},
180+
{
181+
"'[email protected]'.isEmail()",
182+
true,
183+
},
184+
{
185+
"'<[email protected]>'.isEmail()",
186+
false,
187+
},
188+
{
189+
"' [email protected]'.isEmail()",
190+
false,
191+
},
192+
{
193+
"'[email protected] '.isEmail()",
194+
false,
195+
},
180196
}
181197

182198
for _, tc := range tests {

0 commit comments

Comments
 (0)