mirror of
https://github.com/fiatjaf/khatru.git
synced 2025-04-13 14:29:28 +02:00
get rid of base64x temporarily since it doesn't work on arm64.
This commit is contained in:
parent
f72dea346f
commit
f47282c745
@ -1,12 +1,12 @@
|
||||
package blossom
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/cloudwego/base64x"
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/nbd-wtf/go-nostr"
|
||||
)
|
||||
@ -17,7 +17,7 @@ func readAuthorization(r *http.Request) (*nostr.Event, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
eventj, err := base64x.StdEncoding.DecodeString(token[6:])
|
||||
eventj, err := base64.StdEncoding.DecodeString(token[6:])
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("invalid base64 token")
|
||||
}
|
||||
|
4
nip86.go
4
nip86.go
@ -3,6 +3,7 @@ package khatru
|
||||
import (
|
||||
"context"
|
||||
"crypto/sha256"
|
||||
"encoding/base64"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
@ -12,7 +13,6 @@ import (
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"github.com/cloudwego/base64x"
|
||||
"github.com/nbd-wtf/go-nostr"
|
||||
"github.com/nbd-wtf/go-nostr/nip86"
|
||||
)
|
||||
@ -72,7 +72,7 @@ func (rl *Relay) HandleNIP86(w http.ResponseWriter, r *http.Request) {
|
||||
goto respond
|
||||
}
|
||||
|
||||
evtj, err := base64x.StdEncoding.DecodeString(spl[1])
|
||||
evtj, err := base64.StdEncoding.DecodeString(spl[1])
|
||||
if err != nil {
|
||||
resp.Error = "invalid base64 auth"
|
||||
goto respond
|
||||
|
Loading…
x
Reference in New Issue
Block a user