forked from gophish/gophish
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
qy-zh
authored and
qy-zh
committed
Sep 11, 2023
1 parent
ab62161
commit 0b37908
Showing
232 changed files
with
10,843 additions
and
12,904 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,4 @@ updates: | |
schedule: | ||
interval: "daily" # Check for updates once a day | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
//go:build !go1.7 | ||
// +build !go1.7 | ||
|
||
package context | ||
|
||
import ( | ||
"net/http" | ||
|
||
"github.com/gorilla/context" | ||
) | ||
|
||
func Get(r *http.Request, key interface{}) interface{} { | ||
return context.Get(r, key) | ||
} | ||
|
||
func Set(r *http.Request, key, val interface{}) *http.Request { | ||
if val == nil { | ||
return r | ||
} | ||
|
||
context.Set(r, key, val) | ||
return r | ||
} | ||
|
||
func Clear(r *http.Request) { | ||
context.Clear(r) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
//go:build go1.7 | ||
// +build go1.7 | ||
|
||
package context | ||
|
||
import ( | ||
"net/http" | ||
|
||
"context" | ||
) | ||
|
||
// Get retrieves a value from the request context | ||
func Get(r *http.Request, key interface{}) interface{} { | ||
return r.Context().Value(key) | ||
} | ||
|
||
// Set stores a value on the request context | ||
func Set(r *http.Request, key, val interface{}) *http.Request { | ||
if val == nil { | ||
return r | ||
} | ||
|
||
return r.WithContext(context.WithValue(r.Context(), key, val)) | ||
} | ||
|
||
// Clear is a null operation, since this is handled automatically in Go > 1.7 | ||
func Clear(r *http.Request) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
gophish - Open-Source Phishing Framework | ||
The MIT License (MIT) | ||
Copyright (c) 2013 Jordan Wright | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
*/ | ||
|
||
// Package context provides the ability to store request-scoped values on an http.Request instance. These values are cleared after every request. | ||
// This package was created due to Go v1.7 moving the context package into the stdlib, which had a net effect of breaking some functionality from the existing gorilla/context. | ||
package context |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.