Re:Suspended from Google Play for listing supported subtitle...
by tyingq on Monday January 25, 2021 @03:32PM
(#25908392)
Doesn't popen() pass strings to a shell? Sounds dangerous, as you would have to escape semicolons, quotes, etc.
Re:Suspended from Google Play for listing supported subtitle...
by ljm on Monday January 25, 2021 @04:42PM
(#25909323)
I might be wrong but I think it's about censoring the 'hell' in 'shell'. Because some parts of the world consider words like 'hell' and 'damn' to be profane.
Re:Suspended from Google Play for listing supported subtitle...
by siltpotato on Monday January 25, 2021 @02:50PM
(#25907855)
Hold on, what? Okay, return false if they aren't equal, then open another process to repeat this method once again in the shell... I can't guess the reason. Would you know if there is any reason this might have been done?
Re:Suspended from Google Play for listing supported subtitle...
by boring_twenties on Tuesday January 26, 2021 @01:31PM
(#25919439)
I wouldn't know the real reason for sure, but this seems plausible:
1) They got tired of having to modify C code and wait for the deploy cycle to modify the filter
2) Using, for example, the database would be more work than calling a shell script. On top of that, it might actually be beyond the abilities of the programmer involved.
3) The C code executes on an arbitrary machine. Hence the ssh to a specific machine, so that the shell script would only have to be maintained in one place
I worked at a place that had a profanity filter in two parts.
The first part was in C, several pages of if (!strcmp(x, a)) return 0;
After all that, it then invokes popen() to ssh to another machine and run a shell script there, which contains several more pages of string comparisons, this time in shell.