0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-28 02:54:37 +01:00
gitea/modules
TimberBro 84d05516dc
Fix NPM packages name validation (#26595)
- Added new tests to cover corner cases
- Replace existing regex with new one
Closes #26551 

---
As @silverwind suggested, I started from
[validate-npm-package-name](https://github.com/npm/validate-npm-package-name),
but found this solution too complicated.
Then I tried to fix existing regex myself, but thought, that exclude all
restricted symbols is harder, than set only allowed symbols.
Then I search a bit more and found
[package-name-regex](https://github.com/dword-design/package-name-regex)
and regex from it works for all new test cases.

Let me know, if more information or help with this PR is needed.
2023-08-20 15:06:42 +00:00
..
actions Fix the bug when getting files changed for pull_request_target event (#26320) 2023-08-05 14:26:06 +08:00
activitypub
analyze Rename code_langauge.go to code_language.go (#26377) 2023-08-07 15:00:53 -04:00
assetfs
auth
avatar
base
cache
charset
container
context Fix display problems of members and teams unit (#26363) 2023-08-15 16:00:35 +02:00
csv
doctor
emoji
eventsource
generate Handle base64 decoding correctly to avoid panic (#26483) 2023-08-14 10:30:16 +00:00
git Sync repo's IsEmpty status correctly (#26517) 2023-08-17 04:43:39 +00:00
gitgraph
graceful
hcaptcha
highlight
hostmatcher
html Refactor backend SVG package and add tests (#26335) 2023-08-05 04:34:59 +00:00
httpcache
httplib
indexer Support rebuilding issue indexer manually (#26546) 2023-08-17 14:05:17 +00:00
issue/template
json
label
lfs
log
markup Make user-content-* consistent with github (#26388) 2023-08-09 09:30:31 +00:00
mcaptcha
metrics
migration
mirror
nosql
notification Add missing triggers to update issue indexer (#26539) 2023-08-16 17:36:05 +08:00
options
packages Fix NPM packages name validation (#26595) 2023-08-20 15:06:42 +00:00
paginator
pprof
private
process
proxy
proxyprotocol
public
queue
recaptcha
references
regexplru
repository
secret
session
setting Handle base64 decoding correctly to avoid panic (#26483) 2023-08-14 10:30:16 +00:00
sitemap
ssh Fix admin queue page title (#26409) 2023-08-10 02:05:37 +00:00
storage Adjust minio new sequence, now it will check whether bucket exist first and then create one if it doesn't exist (#26420) 2023-08-12 08:03:54 +00:00
structs Add API route to list org secrets (#26485) 2023-08-15 14:32:43 +02:00
svg Refactor backend SVG package and add tests (#26335) 2023-08-05 04:34:59 +00:00
sync
system
templates Use template context function for avatar rendering (#26385) 2023-08-10 11:19:39 +08:00
test Start using template context function (#26254) 2023-08-08 01:22:47 +00:00
testlogger
timeutil
translation
turnstile
typesniffer Detect ogg mime-type as audio or video (#26494) 2023-08-15 10:31:25 +08:00
updatechecker
upload
uri
user
util Handle base64 decoding correctly to avoid panic (#26483) 2023-08-14 10:30:16 +00:00
validation
web
webhook