mirror of
https://github.com/spatie/dnsrecords.io.git
synced 2026-04-27 08:25:57 +03:00
[PR #33] [MERGED] Handle special characters #40
Labels
No labels
bug
good first issue
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/dnsrecords.io#40
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/spatie/dnsrecords.io/pull/33
Author: @brendt
Created: 11/1/2017
Status: ✅ Merged
Merged: 11/1/2017
Merged by: @freekmurze
Base:
master← Head:handle-special-characters📝 Commits (3)
94f2f35Add POST route on / so that special characters like ? and . don't trigger a bad request.64ee0faAdd domain lookup sanitizer middleware48c9364Add domain to page title📊 Changes
11 files changed (+123 additions, -51 deletions)
View changed files
📝
app/Http/Controllers/HomeController.php(+5 -1)📝
app/Http/Kernel.php(+1 -0)➕
app/Http/Middleware/SanitizeDnsLookup.php(+32 -0)📝
app/Services/Commands/Commands/DnsLookup.php(+5 -4)📝
resources/assets/js/app.js(+2 -5)📝
resources/views/layout/master.blade.php(+1 -1)📝
routes/web.php(+11 -2)➕
tests/Feature/DnsLookupTest.php(+56 -0)➖
tests/Feature/ExampleTest.php(+0 -20)📝
tests/TestCase.php(+10 -0)➖
tests/Unit/ExampleTest.php(+0 -18)📄 Description
This PR adds a few things:
{command}in Laravel's router:.,..and?. Fixing this issue is done by allowing POST requests on/. It won't show any results though, which for.would be a nice to have. I will work on a fix for that one soon.http://or containing a path in the URL will be transformed to just the host, and you'll be redirected to that URL before showing results. By doing so, the hardcoded.replacein JavaScript has been removed. Sanitizing this URL and redirecting is done in a middleware, and uses the sameDnsRecordsRetrieveras the lookup command itself.Todo:
.lookup work.Though a review is already welcome.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.