2 Commits

Author SHA1 Message Date
Ettore
98a2bfe281 Update gitignore 2026-01-08 21:41:50 +01:00
Ettore
c5ff6ce958 Add ca_bundle for ssl termination. Add config.ini file for parameters 2026-01-08 21:41:01 +01:00
3 changed files with 28 additions and 12 deletions

3
.gitignore vendored
View File

@@ -28,4 +28,5 @@ __pycache__/*
!fatture_ccsr/fatture_ccsr.spec
*.wxg
.venv
*/config.ini
config.ini
certificates/*

View File

@@ -40,8 +40,8 @@ class FattureCCSRFrame(wx.Frame):
config_file = "./config.ini"
try:
config = configparser.ConfigParser()
config.read_file(open(config_file))
self.config = configparser.ConfigParser()
self.config.read_file(open(config_file))
except Exception as e:
print(f"Error in reading the config file: {e}")
sys.exit(2)
@@ -56,7 +56,9 @@ class FattureCCSRFrame(wx.Frame):
self.input_files = list()
self.log_dialog = None
self.session = requests.Session()
self.session.verify = self.config['REPORT_SERVER'].get('CA_BUNDLE', True)
self.panel = wx.Panel(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.FULL_REPAINT_ON_RESIZE | wx.TAB_TRAVERSAL)
self.main_sizer = wx.BoxSizer(wx.VERTICAL)
@@ -298,7 +300,7 @@ class LoginDialog(wx.Dialog):
session = self.GetParent().session
session.auth = requests_ntlm.HttpNtlmAuth("sanrossore\\"+self.username.GetValue(), self.password.GetValue())
try:
login = session.get('https://report.casadicurasanrossore.it:8443/Reports/browse/')
login = session.get(self.GetParent().config['REPORT_SERVER']['URL']+'/Reports/browse/')
if login.status_code == 200:
self.logged_in = True
self.username.SetValue('')

View File

@@ -1,8 +1,21 @@
requests_ntlm==1.1.0
wxPython==4.0.7
requests==2.24.0
openpyxl==3.0.5
Unidecode==1.1.2
PyPDF2==1.26.0
numpy<1.24
lxml
# HTTP requests and NTLM authentication
requests>=2.28.0
requests-ntlm>=1.1.0
# GUI framework
wxPython>=4.1.0
# Excel file parsing
openpyxl>=3.7.0
# PDF manipulation
PyPDF2>=2.0.0
# String utilities
Unidecode>=1.2.0
# XML parsing and validation
lxml>=4.6.0
# Numerical operations
numpy>=1.20.0