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

Fixed peer status is not refreshing correctly #306

Merged
merged 1 commit into from
Aug 18, 2024
Merged

Fixed peer status is not refreshing correctly #306

merged 1 commit into from
Aug 18, 2024

Conversation

donaldzou
Copy link
Owner

  • Peer was not refreshing correctly.

@donaldzou donaldzou merged commit 16998d1 into main Aug 18, 2024
2 checks passed
p[pCounter]["name"] = split[1]
# if self.__configFileModifiedTime is None or self.__configFileModifiedTime != mt:
self.Peers = []
with open(os.path.join(WG_CONF_PATH, f'{self.Name}.conf'), 'r') as configFile:

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.

for i in p:
if "PublicKey" in i.keys():
checkIfExist = sqldb.cursor().execute("SELECT * FROM '%s' WHERE id = ?" % self.Name,

Check failure

Code scanning / CodeQL

SQL query built from user-controlled sources High

This SQL query depends on a
user-provided value
.
Comment on lines +629 to +634
"""
INSERT INTO '%s'
VALUES (:id, :private_key, :DNS, :endpoint_allowed_ip, :name, :total_receive, :total_sent,
:total_data, :endpoint, :status, :latest_handshake, :allowed_ip, :cumu_receive, :cumu_sent,
:cumu_data, :mtu, :keepalive, :remote_endpoint, :preshared_key);
""" % self.Name

Check failure

Code scanning / CodeQL

SQL query built from user-controlled sources High

This SQL query depends on a
user-provided value
.
sqldb.commit()
self.Peers.append(Peer(newPeer, self))
else:
sqldb.cursor().execute("UPDATE '%s' SET allowed_ip = ? WHERE id = ?" % self.Name,

Check failure

Code scanning / CodeQL

SQL query built from user-controlled sources High

This SQL query depends on a
user-provided value
.
@donaldzou donaldzou deleted the v4.0-fix1 branch August 21, 2024 03:35
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.

1 participant