← Back to team overview

gufw-developers team mailing list archive

[Bug 1410839] Re: Shell Command injection in ufw_backend.py

 

hmmm... 
would it not be easyer to have a  "backup" button instead of export ?
If the user clicks "backup" button he gets a message like this

"A backup of your Office.profile has bes saved to /etc/gufw/backup/Office_(Time and Date here).profile"
"Do you want to open the backup folder in your file browser now ? yes/NO"

And if he clicks "YES" , the file browser (nautilus) opens with user
rigths  leading him to the fixed path  /etc/gufw/backup/ where he can
copy and paste his backups to an other path if he wants.

So the export function can have a fixed path in his string without user
interaction.

-- 
You received this bug notification because you are a member of Gufw
Developers, which is subscribed to Gufw.
https://bugs.launchpad.net/bugs/1410839

Title:
  Shell Command injection in ufw_backend.py

Status in Gufw:
  Fix Committed

Bug description:
  Firewall Administrators can be tricked by someone to export a profile
  with Gufw to an special crafted file or path name wich contains shell
  code.

  reason is this line in ufw_backend.py :

  def export_profile(self, profile, file):
      commands.getstatusoutput('cp /etc/gufw/' + profile + '.profile ' + file + ' ; chmod 777 ' + file)

  The rename and delete funktions are also unsave if profile name
  contains shell code, like semicolons.

To manage notifications about this bug go to:
https://bugs.launchpad.net/gui-ufw/+bug/1410839/+subscriptions


References