Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
bitmask-vpn
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leap
bitmask-vpn
Commits
9882dfc4
Unverified
Commit
9882dfc4
authored
4 years ago
by
Kali Kaneko
Browse files
Options
Downloads
Patches
Plain Diff
[bug] anon needs no credentials
parent
70922083
No related branches found
No related tags found
1 merge request
!105
Sip login
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
gui/qml/main.qml
+1
-1
1 addition, 1 deletion
gui/qml/main.qml
pkg/backend/api.go
+3
-5
3 additions, 5 deletions
pkg/backend/api.go
pkg/vpn/bonafide/auth_anon.go
+1
-1
1 addition, 1 deletion
pkg/vpn/bonafide/auth_anon.go
with
5 additions
and
7 deletions
gui/qml/main.qml
+
1
−
1
View file @
9882dfc4
...
@@ -24,7 +24,7 @@ ApplicationWindow {
...
@@ -24,7 +24,7 @@ ApplicationWindow {
console
.
debug
(
jsonModel
.
getJson
())
console
.
debug
(
jsonModel
.
getJson
())
login
.
visible
=
true
login
.
visible
=
true
}
}
if
(
ctx
.
loginOk
==
'
true
'
&&
loginDone
==
false
)
{
if
(
ctx
.
loginOk
==
'
true
'
)
{
loginOk
.
visible
=
true
loginOk
.
visible
=
true
}
}
if
(
ctx
.
errors
)
{
if
(
ctx
.
errors
)
{
...
...
This diff is collapsed.
Click to expand it.
pkg/backend/api.go
+
3
−
5
View file @
9882dfc4
...
@@ -17,7 +17,7 @@ func Login(username, password string) {
...
@@ -17,7 +17,7 @@ func Login(username, password string) {
success
,
err
:=
ctx
.
bm
.
DoLogin
(
username
,
password
)
success
,
err
:=
ctx
.
bm
.
DoLogin
(
username
,
password
)
if
err
!=
nil
{
if
err
!=
nil
{
log
.
Printf
(
"Error on login: %v"
,
err
)
log
.
Printf
(
"Error on login: %v"
,
err
)
ctx
.
Errors
=
"bad_auth
_unknown
"
ctx
.
Errors
=
"bad_auth"
}
else
if
success
{
}
else
if
success
{
log
.
Printf
(
"Logged in as %s"
,
username
)
log
.
Printf
(
"Logged in as %s"
,
username
)
ctx
.
LoginOk
=
true
ctx
.
LoginOk
=
true
...
@@ -73,13 +73,11 @@ func InitializeBitmaskContext(opts *InitOpts) {
...
@@ -73,13 +73,11 @@ func InitializeBitmaskContext(opts *InitOpts) {
opts
.
AppName
=
p
.
AppName
opts
.
AppName
=
p
.
AppName
initOnce
.
Do
(
func
()
{
initializeContext
(
opts
)
})
initOnce
.
Do
(
func
()
{
initializeContext
(
opts
)
})
runDonationReminder
()
if
ctx
.
bm
!=
nil
{
if
ctx
.
bm
!=
nil
{
if
ctx
.
bm
.
NeedsCredentials
()
{
ctx
.
LoginDialog
=
ctx
.
bm
.
NeedsCredentials
()
ctx
.
LoginDialog
=
true
}
go
ctx
.
updateStatus
()
go
ctx
.
updateStatus
()
}
}
runDonationReminder
()
}
}
func
RefreshContext
()
*
C
.
char
{
func
RefreshContext
()
*
C
.
char
{
...
...
This diff is collapsed.
Click to expand it.
pkg/vpn/bonafide/auth_anon.go
+
1
−
1
View file @
9882dfc4
...
@@ -22,7 +22,7 @@ import (
...
@@ -22,7 +22,7 @@ import (
type
anonymousAuthentication
struct
{}
type
anonymousAuthentication
struct
{}
func
(
a
*
anonymousAuthentication
)
needsCredentials
()
bool
{
func
(
a
*
anonymousAuthentication
)
needsCredentials
()
bool
{
return
tru
e
return
fals
e
}
}
func
(
a
*
anonymousAuthentication
)
getToken
(
user
,
password
string
)
([]
byte
,
error
)
{
func
(
a
*
anonymousAuthentication
)
getToken
(
user
,
password
string
)
([]
byte
,
error
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment