Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge next into master #454

Merged
merged 5 commits into from
Jul 12, 2024
Merged

Merge next into master #454

merged 5 commits into from
Jul 12, 2024

Conversation

jsumners
Copy link
Member

@jsumners jsumners commented Jul 3, 2024

As titled.

bilalshareef and others added 2 commits July 5, 2024 06:38
* Update for v5

* c8 ignore

* remove dep

* c8

---------

Co-authored-by: Gürgün Dayıoğlu <[email protected]>
@jsumners
Copy link
Member Author

@climba03003 please resolve the issues here.

fastify-static on  next
❯ rg 'stream\.on'
index.js
227:    stream.on('file', function (file) {
273:      stream.on('headers', setHeaders)
276:    stream.on('directory', function (_, path) {
314:    stream.on('error', function (err) {

fastify-static/index.js

Lines 224 to 229 in c569cf3

// `send(..., path, ...)` will URI-decode path so we pass an encoded path here
const stream = send(request.raw, encodeURI(pathnameForSend), options)
let resolvedFilename
stream.on('file', function (file) {
resolvedFilename = file
})

@climba03003
Copy link
Member

please resolve the issues here.

Since the structure and feature is drastically changed.
I / We need to comes up an idea on how to solve on @fastify/send first.
For example, the directory and file event.

@jsumners
Copy link
Member Author

I don't use either of the modules in question. All I know is that @fastify/send is a dependency here, and that it was recently changed to remove the exported event emitter. I would have solved the issues here if the changes were minor. As it is, I suggest re-adding the event emitter to @fastify/send such that this module can be updated easily.

* chore!: bump dependency send@3

* fixup

* fixup

* chore: use v5 workflow

* chore: bump dependency [email protected]

* fixup
reply.redirect(301, getRedirectUrl(request.raw.url))
} /* c8 ignore start */ catch (error) {
// the try-catch here is actually unreachable, but we keep it for safety and prevent DoS attack
await reply.send(error)

Check warning

Code scanning / CodeQL

Information exposure through a stack trace Medium

This information exposed to the user depends on
stack trace information
.
@jsumners jsumners marked this pull request as ready for review July 12, 2024 10:38
@jsumners jsumners merged commit 1e041d7 into master Jul 12, 2024
24 checks passed
@jsumners jsumners deleted the next branch July 12, 2024 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants