Bug 89384 - can not use "*" symbol
Summary: can not use "*" symbol
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Applications
Component: Latex Plugin (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR critical
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-13 00:07 UTC by Marius
Modified: 2004-10-02 12:28 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marius 2004-09-13 00:07:52 UTC
Version:            (using KDE KDE 3.3.0)
Installed from:    Debian testing/unstable Packages
OS:                Linux

Insteed of "*" I get list of files in my home directory.
Comment 1 Till Gerken 2004-09-13 00:35:50 UTC
I consider this to be a critical bug if the shell command is not properly escaped.
Comment 2 Jason Keirstead 2004-09-13 01:20:20 UTC
What part of Kopete exactly is this bug referring to?

You can type * in a chat without getting a list of files in your home direcotry, thats for sure.

In fact the only possible way I can see you'd ever get a list of files in your home directory is if you typed /exec ls *, in which case it is actually correct.
Comment 3 Marius 2004-09-13 02:15:40 UTC
Enable KopeTeX plugin and type $$*$$

ps: with /exec ls * I get crash.
Comment 4 Olivier Goffart 2004-10-02 12:28:16 UTC
CVS commit by ogoffart: 


Escape bash willcards in the latex text.
So now, you can uses * in a latex expression without echoing all file in the current dirrectory.
The bug was in ex2im.  I'll probably report back the bug there also.

CCMAIL: 89384-done@bugs.kde.org

I'll backport and this will be fixed for KDE 3.1.1 


  M +20 -20    kopete_latexconvert.sh   1.3


--- kdenetwork/kopete/plugins/latex/kopete_latexconvert.sh  #1.2:1.3
@@ -51,12 +51,12 @@
            default is on for normal mode and
                           off for transparent mode
--o file    specifies output filename, 
+-o file    specifies output filename,
            default is inputfile with new extension
--f expr    specifies output format, 
+-f expr    specifies output format,
            possible examples: gif, jpg, tif......
-           all formates supported by 'convert' should work, 
+           all formates supported by 'convert' should work,
            default: png
--r expr    specifies desired resolution in dpi, 
-           possible examples: 100x100, 300x300, 200x150, 
+-r expr    specifies desired resolution in dpi,
+           possible examples: 100x100, 300x300, 200x150,
            default is 150x150
 -b expr    specifies the background color
@@ -77,7 +77,7 @@
                 z) trans=1
                    aa=0;;
-                a) if [ $aa -eq 0 ]; then 
-                                aa=1 
-                        else 
+                a) if [ $aa -eq 0 ]; then
+                                aa=1
+                        else
                                 aa=0
                         fi;;
@@ -86,5 +86,5 @@
                 t) color2=$OPTARG;;
                 f) format=$OPTARG;;
-      x) extra_header=$OPTARG;;                 
+      x) extra_header=$OPTARG;;
         esac
 done
@@ -106,5 +106,5 @@
         mkdir $tmpdir
 fi
-homedir="`pwd`" || exit 1  
+homedir="`pwd`" || exit 1
 
 #
@@ -115,7 +115,7 @@
 do
 
-eval infile=\$${OPTIND}   
+eval infile=\$${OPTIND}
 
-if [ -z $outfile ]; then        
+if [ -z $outfile ]; then
         if [ -e "$infile" ]; then
                 base=`basename ${infile} .tex` ;
@@ -172,6 +172,6 @@
 #       cat $infile >> $tmpdir/out.tex
 #else
-        echo $infile >> $tmpdir/out.tex
-#fi     
+        echo "$infile" >> $tmpdir/out.tex
+#fi
 
 if [ $noformula -eq 1 ]; then
@@ -204,13 +204,13 @@
 if [ $trans -eq 1 ]; then
         if [ $aa -eq 1 ]; then
-                convert +adjoin -antialias -transparent $color1 -density $resolution $tmpdir/out.eps $tmpdir/out.$format        
+                convert +adjoin -antialias -transparent $color1 -density $resolution $tmpdir/out.eps $tmpdir/out.$format
         else
-                convert +adjoin +antialias -transparent $color1 -density $resolution $tmpdir/out.eps $tmpdir/out.$format        
+                convert +adjoin +antialias -transparent $color1 -density $resolution $tmpdir/out.eps $tmpdir/out.$format
         fi
-else    
+else
         if [ $aa -eq 1 ]; then
-                convert +adjoin -antialias -density $resolution $tmpdir/out.eps $tmpdir/out.$format     
+                convert +adjoin -antialias -density $resolution $tmpdir/out.eps $tmpdir/out.$format
         else
-                convert +adjoin +antialias -density $resolution $tmpdir/out.eps $tmpdir/out.$format     
+                convert +adjoin +antialias -density $resolution $tmpdir/out.eps $tmpdir/out.$format
         fi
 fi
@@ -231,4 +231,4 @@
 #
 
-rm -rf $tmpdir 
+rm -rf $tmpdir
 exit 0