mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-05-01 22:57:33 +02:00
sending guid with update check
This commit is contained in:
parent
65ce16dc55
commit
c46b23de3a
@ -37,6 +37,7 @@
|
||||
#include <qapplication.h>
|
||||
#include <QDir>
|
||||
#include <QDesktopWidget>
|
||||
#include <QUuid>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@ -96,6 +97,8 @@ const char* clipComment = SETTINGS_PATH_PREFIX "/UI/ClipComment";
|
||||
const char* checkUpdates = SETTINGS_PATH_PREFIX "/UI/CheckUpdates";
|
||||
const char* checkUpdatesProxy = SETTINGS_PATH_PREFIX "/UI/CheckUpdatesProxy";
|
||||
|
||||
const char* appGUID = SETTINGS_PATH_PREFIX "/ApplicationGUID";
|
||||
|
||||
FWBSettings::FWBSettings() :
|
||||
QSettings(QSettings::UserScope, "netcitadel.com", "Firewall Builder")
|
||||
{
|
||||
@ -114,6 +117,9 @@ void FWBSettings::init()
|
||||
{
|
||||
bool ok=false;
|
||||
|
||||
ok = contains(appGUID);
|
||||
if (!ok) setValue(appGUID, QUuid::createUuid().toString() );
|
||||
|
||||
ok = contains(infoStyleSetpath);
|
||||
if (!ok) setValue(infoStyleSetpath,2);
|
||||
|
||||
@ -200,6 +206,11 @@ void FWBSettings::init()
|
||||
#endif
|
||||
}
|
||||
|
||||
QString FWBSettings::getAppGUID()
|
||||
{
|
||||
return value(appGUID).toString();
|
||||
}
|
||||
|
||||
QString FWBSettings::getStr(const QString &attribute)
|
||||
{
|
||||
QString path=SETTINGS_PATH_PREFIX "/"+attribute;
|
||||
|
||||
@ -149,6 +149,8 @@ class FWBSettings : public QSettings {
|
||||
void getPrinterOptions(QPrinter *printer,int &pageWidth,int &pageHeight);
|
||||
void setPrinterOptions(QPrinter *printer,int pageWidth,int pageHeight);
|
||||
|
||||
QString getAppGUID();
|
||||
|
||||
enum IconSize getIconsInRulesSize();
|
||||
void setIconsInRulesSize(enum IconSize size);
|
||||
|
||||
|
||||
@ -23,10 +23,12 @@
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "../../config.h"
|
||||
#include "global.h"
|
||||
#include "check_update_url.h"
|
||||
#include "../../VERSION.h"
|
||||
#include "../../build_num"
|
||||
|
||||
#include "utils.h"
|
||||
#include "utils_no_qt.h"
|
||||
|
||||
@ -375,7 +377,8 @@ void FWWindow::startupLoad()
|
||||
if (st->getCheckUpdates())
|
||||
{
|
||||
// start http query to get latest version from the web site
|
||||
current_version_http_getter->get(QUrl(CHECK_UPDATE_URL));
|
||||
QString url = QString(CHECK_UPDATE_URL).arg(VERSION).arg(st->getAppGUID());
|
||||
current_version_http_getter->get(QUrl(url));
|
||||
}
|
||||
|
||||
if (activeProject())
|
||||
|
||||
@ -26,8 +26,11 @@
|
||||
|
||||
#include "../../config.h"
|
||||
#include "global.h"
|
||||
#include "utils.h"
|
||||
#include "check_update_url.h"
|
||||
#include "../../VERSION.h"
|
||||
#include "../../build_num"
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
#include "PrefsDialog.h"
|
||||
#include "FWBSettings.h"
|
||||
@ -390,7 +393,8 @@ void PrefsDialog::checkSwUpdates()
|
||||
|
||||
connect(¤t_version_http_getter, SIGNAL(done(const QString&)),
|
||||
this, SLOT(checkForUpgrade(const QString&)));
|
||||
current_version_http_getter.get(QUrl(CHECK_UPDATE_URL));
|
||||
QString url = QString(CHECK_UPDATE_URL).arg(VERSION).arg(st->getAppGUID());
|
||||
current_version_http_getter.get(QUrl(url));
|
||||
}
|
||||
|
||||
void PrefsDialog::checkForUpgrade(const QString& server_response)
|
||||
|
||||
@ -27,10 +27,7 @@
|
||||
#ifndef CHECK_UPDATE_URL_HH
|
||||
#define CHECK_UPDATE_URL_HH
|
||||
|
||||
#include "../../VERSION.h"
|
||||
#include "../../build_num"
|
||||
|
||||
#define CHECK_UPDATE_URL "http://update.fwbuilder.org/update_checks/check.cgi?v="VERSION
|
||||
#define CHECK_UPDATE_URL "http://update.fwbuilder.org/update_checks/check.cgi?v=%1&uuid=%2"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>669</width>
|
||||
<height>419</height>
|
||||
<height>422</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
@ -29,9 +29,6 @@
|
||||
<string>General</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_4" >
|
||||
<property name="verticalSpacing" >
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
<spacer name="verticalSpacer_5" >
|
||||
<property name="orientation" >
|
||||
@ -116,14 +113,21 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<item row="1" column="1" colspan="2" >
|
||||
<widget class="QPushButton" name="checkUpdatesNow" >
|
||||
<property name="text" >
|
||||
<string>Check Now</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item rowspan="2" row="2" column="0" >
|
||||
<widget class="QCheckBox" name="checkUpdates" >
|
||||
<property name="text" >
|
||||
<string>Check for updates automatically</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<item row="2" column="1" >
|
||||
<spacer name="horizontalSpacer_2" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@ -136,14 +140,7 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="2" >
|
||||
<widget class="QPushButton" name="checkUpdatesNow" >
|
||||
<property name="text" >
|
||||
<string>Check Now</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3" >
|
||||
<item row="2" column="3" >
|
||||
<spacer name="spacer_3" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@ -156,35 +153,39 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="4" >
|
||||
<item row="4" column="0" colspan="4" >
|
||||
<widget class="QLabel" name="label_2" >
|
||||
<property name="text" >
|
||||
<string>Use http proxy while checking for updates (host:port)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="4" >
|
||||
<item row="5" column="0" colspan="4" >
|
||||
<widget class="QLineEdit" name="checkUpdatesProxy" />
|
||||
</item>
|
||||
<item row="6" column="0" colspan="4" >
|
||||
<widget class="QLabel" name="label_3" >
|
||||
<property name="text" >
|
||||
<string>No identifiable information will be sent to the server during update check</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2" >
|
||||
<spacer name="verticalSpacer_9" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>7</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>86</width>
|
||||
<height>31</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabObjects" >
|
||||
|
||||
@ -806,15 +806,10 @@
|
||||
</Interface>
|
||||
<ObjectRef ref="id3B0221F1-ipv4"/>
|
||||
<IPv6 id="id42610X47974" name="firewall-ipv6-5:eth0:ip6" comment="" ro="False" address="fe80::21d:9ff:fe8b:8e94" netmask="64"/>
|
||||
<ServiceRef ref="sysid1"/>
|
||||
<ObjectRef ref="sysid0"/>
|
||||
<ObjectRef ref="sysid0"/>
|
||||
<IPv6 id="id100945X48026" name="firewall-ipv6-5:eth1:ipv6" comment="" ro="False" address="fe80::21d:9ff:fe8b:8e94" netmask="64"/>
|
||||
<ObjectRef ref="id178392X48026"/>
|
||||
<IPv6 id="id197751X48026" name="firewall-ipv6-5:eth0:ipv6" comment="" ro="False" address="fe80::21d:9ff:fe8b:8e94" netmask="64"/>
|
||||
<ObjectRef ref="sysid0"/>
|
||||
<IPv6 id="id178394X48026" name="firewall-ipv6-6:eth1:ip6" comment="" ro="False" address="fe80::21d:9ff:fe8b:8e94" netmask="64"/>
|
||||
<ObjectRef ref="id178392X48026"/>
|
||||
<ObjectRef ref="sysid0"/>
|
||||
</Library>
|
||||
<Library id="syslib001" color="#d2ffd0" name="User" comment="User defined objects" ro="False">
|
||||
@ -823,7 +818,7 @@
|
||||
<AddressTable id="id4385C1081434" filename="addr-table-1.tbl" run_time="False" name="addrtbl 1" comment="" ro="False"/>
|
||||
<AddressTable id="id4389EE9018346" filename="addr-table-1.tbl" run_time="False" name="addr-table-1" comment="" ro="False"/>
|
||||
<AddressTable id="id4389EE9118346" filename="block-hosts.tbl" run_time="True" name="block these" comment="this is run-time table" ro="False"/>
|
||||
<AddressTable id="id44F7056328576" filename="/home/vadim/tmp/bug-1544488/addr-table-1.tbl" run_time="True" name="atbl.1" comment="the name contains character that is special to shell" ro="False"/>
|
||||
<AddressTable id="id44F7056328576" filename="addr-table-1.tbl" run_time="True" name="atbl.1" comment="the name contains character that is special to shell" ro="False"/>
|
||||
<AddressTable id="id459673BE7794" filename="emtpy-table.tbl" run_time="False" name="empty table" comment="" ro="False"/>
|
||||
</ObjectGroup>
|
||||
<ObjectGroup id="stdid01_1_og_dnsn_1" name="DNS Names" comment="" ro="False">
|
||||
@ -24829,7 +24824,7 @@ echo '%FWBPROMPT%'; sh /tmp/%FWSCRIPT%
|
||||
<Option name="verify_interfaces">True</Option>
|
||||
</FirewallOptions>
|
||||
</Firewall>
|
||||
<Firewall id="id44EC18128791" host_OS="linux24" inactive="False" lastCompiled="1215360281" lastInstalled="0" lastModified="1168820241" platform="iptables" version="" name="firewall41" comment="testing rule shadowing with run-time objects, rules with such objects should be ignored " ro="False">
|
||||
<Firewall id="id44EC18128791" host_OS="linux24" inactive="False" lastCompiled="1243319968" lastInstalled="0" lastModified="1243319947" platform="iptables" version="" name="firewall41" comment="testing rule shadowing with run-time objects, rules with such objects should be ignored " ro="False">
|
||||
<NAT id="id44EC18168791" name="NAT" comment="" ro="False" ipv4_rule_set="False" ipv6_rule_set="False" top_rule_set="True"/>
|
||||
<Policy id="id44EC18158791" name="Policy" comment="" ro="False" ipv4_rule_set="False" ipv6_rule_set="False" top_rule_set="True">
|
||||
<PolicyRule id="id44EC181E8791" disabled="False" log="True" position="0" action="Accept" direction="Both" comment="">
|
||||
@ -24886,6 +24881,26 @@ echo '%FWBPROMPT%'; sh /tmp/%FWSCRIPT%
|
||||
</When>
|
||||
<PolicyRuleOptions/>
|
||||
</PolicyRule>
|
||||
<PolicyRule id="id42683X89554" disabled="False" group="" log="True" position="3" action="Deny" direction="Both" comment="">
|
||||
<Src neg="False">
|
||||
<ObjectRef ref="sysid0"/>
|
||||
</Src>
|
||||
<Dst neg="False">
|
||||
<ObjectRef ref="id44F7056328576"/>
|
||||
</Dst>
|
||||
<Srv neg="False">
|
||||
<ServiceRef ref="sysid1"/>
|
||||
</Srv>
|
||||
<Itf neg="False">
|
||||
<ObjectRef ref="sysid0"/>
|
||||
</Itf>
|
||||
<When neg="False">
|
||||
<IntervalRef ref="sysid2"/>
|
||||
</When>
|
||||
<PolicyRuleOptions>
|
||||
<Option name="stateless">True</Option>
|
||||
</PolicyRuleOptions>
|
||||
</PolicyRule>
|
||||
</Policy>
|
||||
<Routing id="id44EC18178791" name="Routing" comment="" ro="False" ipv4_rule_set="False" ipv6_rule_set="False" top_rule_set="True"/>
|
||||
<Interface id="id44EC18188791" bridgeport="False" dyn="False" label="ext" security_level="0" unnum="False" unprotected="False" name="eth0" comment="" ro="False">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user