diff --git a/Gemfile b/Gemfile index 55478816f..3bfe246a4 100644 --- a/Gemfile +++ b/Gemfile @@ -106,3 +106,6 @@ gem 'omniauth-oauth2', '~> 1.6.0' # global var gem 'request_store' + +# 敏感词汇 +gem 'harmonious_dictionary', '~> 0.0.1' diff --git a/app/controllers/concerns/git_helper.rb b/app/controllers/concerns/git_helper.rb index d8479d458..e72f1f5da 100644 --- a/app/controllers/concerns/git_helper.rb +++ b/app/controllers/concerns/git_helper.rb @@ -53,13 +53,15 @@ module GitHelper end # 添加目录 - def git_add_folder(folder_path, author_name, author_email, message) - GitService.add_tree(file_path: folder_path, message: message, author_name: author_name, author_email: author_email) + def git_add_folder(repo_path, folder_path, author_name, author_email, message) + GitService.add_tree(repo_path: repo_path, file_path: folder_path, message: message, author_name: author_name, + author_email: author_email) end # 删除文件 - def git_delete_file(file_path, author_name, author_email, message) - GitService.delete_file(file_path: file_path, message: message, author_name: author_name, author_email: author_email) + def git_delete_file(repo_path, file_path, author_name, author_email, message) + GitService.delete_file(repo_path, repo_path, file_path: file_path, message: message, author_name: author_name, + author_email: author_email) end # 版本库Fork功能 diff --git a/app/controllers/discusses_controller.rb b/app/controllers/discusses_controller.rb index c2cc8f933..bcbba1a3a 100644 --- a/app/controllers/discusses_controller.rb +++ b/app/controllers/discusses_controller.rb @@ -85,7 +85,7 @@ class DiscussesController < ApplicationController :hidden => !current_user.admin?) # 管理员回复的能够显示 rescue Exception => e uid_logger_error("create discuss failed : #{e.message}") - raise Educoder::TipException.new("评论异常") + raise Educoder::TipException.new("评论异常,原因:#{e.message}") end end @@ -97,7 +97,7 @@ class DiscussesController < ApplicationController :dis_type => @discuss.dis_type, :position => @discuss.position) rescue Exception => e uid_logger_error("reply discuss failed : #{e.message}") - raise Educoder::TipException.new("回复评论异常") + raise Educoder::TipException.new("回复评论异常,原因: #{e.message}") end end diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index de69bf033..cf30b15a1 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -16,7 +16,7 @@ class ShixunsController < ApplicationController :propaedeutics, :departments, :apply_shixun_mirror, :jupyter_exec, :get_mirror_script, :download_file, :shixun_list, :batch_send_to_course] before_action :find_repo_name, only: [:repository, :commits, :file_content, :update_file, :shixun_exec, :copy, - :add_file, :jupyter_exec] + :add_file, :jupyter_exec, :upload_git_file, :delete_git_file, :upload_git_folder] before_action :allowed, only: [:update, :close, :update_propaedeutics, :settings, :publish, :apply_public, :upload_git_folder, :shixun_members_added, :change_manager, :collaborators_delete, :upload_git_file, @@ -905,7 +905,7 @@ class ShixunsController < ApplicationController author_name = current_user.real_name author_email = current_user.git_mail message = params[:message] || "upload folder by browser" - git_add_folder(@path, author_name, author_email, message) + git_add_folder(@repo_path, @path, author_name, author_email, message) render_ok end @@ -913,7 +913,7 @@ class ShixunsController < ApplicationController author_name = current_user.real_name author_email = current_user.git_mail message = params[:message] || "delete file by browser" - git_delete_file(@path, author_name, author_email, message) + git_delete_file(@repo_path, @path, author_name, author_email, message) render_ok end @@ -1095,9 +1095,8 @@ private @repo_path = if params[:secret_repository] @shixun.shixun_secret_repository&.repo_path else - @shixun.try(:repo_path) + @shixun.repo_path end - logger.info("######{@repo_path}") @path = params[:path] end diff --git a/app/models/course.rb b/app/models/course.rb index 2f561bba7..9100f8470 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -81,6 +81,8 @@ class Course < ApplicationRecord # 老版的members弃用 现用course_members has_many :members + validate :validate_sensitive_string + scope :hidden, ->(is_hidden = true) { where(is_hidden: is_hidden) } scope :ended, ->(is_end = true) { where(is_end: is_end) } scope :processing, -> { where(is_end: false) } @@ -435,4 +437,8 @@ class Course < ApplicationRecord self.laboratory = Laboratory.current if laboratory_id.blank? end + + def validate_sensitive_string + raise("课堂名称包含敏感词汇,请重新输入") unless HarmoniousDictionary.clean?(name) + end end diff --git a/app/models/course_list.rb b/app/models/course_list.rb index cd622f20a..ab7404a9e 100644 --- a/app/models/course_list.rb +++ b/app/models/course_list.rb @@ -6,4 +6,10 @@ class CourseList < ApplicationRecord has_many :gtask_banks has_many :gtopic_banks belongs_to :user + + validate :validate_sensitive_string + + def validate_sensitive_string + raise("课程名称包含敏感词汇,请重新输入") unless HarmoniousDictionary.clean?(name) + end end diff --git a/app/models/discuss.rb b/app/models/discuss.rb index 4e6cd617c..a236a2bbc 100644 --- a/app/models/discuss.rb +++ b/app/models/discuss.rb @@ -11,6 +11,8 @@ class Discuss < ApplicationRecord belongs_to :dis, polymorphic: true belongs_to :challenge, optional: true + validate :validate_sensitive_string + after_create :send_tiding scope :children, -> (discuss_id){ where(parent_id: discuss_id).includes(:user).reorder(created_at: :asc) } @@ -69,4 +71,8 @@ class Discuss < ApplicationRecord } tidings.create!(base_attrs.merge(user_id: send_user_id)) end + + def validate_sensitive_string + raise("内容包含敏感词汇,请重新输入") unless HarmoniousDictionary.clean?(content) + end end diff --git a/app/models/memo.rb b/app/models/memo.rb index d09251358..d79081350 100644 --- a/app/models/memo.rb +++ b/app/models/memo.rb @@ -16,6 +16,7 @@ class Memo < ApplicationRecord has_many :children, foreign_key: :parent_id, class_name: 'Memo' has_many :attachments, as: :container, dependent: :destroy has_many :tidings, as: :container, dependent: :destroy + validate :validate_sensitive_string scope :field_for_list, lambda{ select([:id, :subject, :author_id, :sticky, :updated_at, :language, :reward, :all_replies_count, :viewed_count, :forum_id]) @@ -54,4 +55,9 @@ class Memo < ApplicationRecord self.tidings << Tiding.new(tiding_attr) end + + def validate_sensitive_string + raise("标题包含敏感词汇,请重新输入") unless HarmoniousDictionary.clean?(subject) + raise("内容包含敏感词汇,请重新输入") unless HarmoniousDictionary.clean?(content) + end end diff --git a/app/models/user.rb b/app/models/user.rb index d6c264e15..54aa8d85e 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -178,13 +178,8 @@ class User < ApplicationRecord validates_uniqueness_of :phone, :if => Proc.new { |user| user.phone_changed? && user.phone.present? }, case_sensitive: false validates_length_of :login, maximum: LOGIN_LENGTH_LIMIT validates_length_of :mail, maximum: MAIL_LENGTH_LMIT - # validates_format_of :mail, with: VALID_EMAIL_REGEX, multiline: true - # validates_format_of :phone, with: VALID_PHONE_REGEX, multiline: true + validate :validate_sensitive_string validate :validate_password_length - #validate :validate_ID_number - #validates_format_of :ID_number, with: VALID_NUMBER_REGEX, multiline: true, message: "身份证号格式不对" - # validates :nickname, presence: true, length: { maximum: 10 } - # validates :lastname, presence: true # 删除自动登录的token,一旦退出下次会提示需要登录 def delete_autologin_token(value) @@ -727,6 +722,11 @@ class User < ApplicationRecord end end + def validate_sensitive_string + raise("真实姓名包含敏感词汇,请重新输入") unless HarmoniousDictionary.clean?(lastname) + raise("昵称包含敏感词汇,请重新输入") unless HarmoniousDictionary.clean?(nickname) + end + def set_laboratory return unless new_record? diff --git a/config/harmonious_dictionary/chinese_dictionary.txt b/config/harmonious_dictionary/chinese_dictionary.txt new file mode 100644 index 000000000..3040d9d0e --- /dev/null +++ b/config/harmonious_dictionary/chinese_dictionary.txt @@ -0,0 +1,1511 @@ +习近平 +习仲勋 +贺国强 +贺子珍 +周永康 +李德生 +王岐山 +姚依林 +回良玉 +李源潮 +李干成 +戴秉国 +黄镇 +刘延东 +刘瑞龙 +俞正声 +黄敬 +薄熙来 +薄一波 +周小川 +周建南 +温云松 +徐明 +江绵康 +李小鹏 +李小琳 +朱云来 +让国人愤怒的第二代身份证 +第二代身份证 +文化大革命 +胡海峰 +六四 +陈良宇 +老丁 +莱仕德事件 +fuck +地下的先烈们纷纷打来电话询问 +大纪元 +新唐人 +淫靡 +六四事件 +迷昏药 +迷魂药 +窃听器 +六合彩 +买卖枪支 +三唑仑 +麻醉药 +麻醉乙醚 +短信群发器 +帝国之梦 +毛一鲜 +黎阳平 +对日强硬 +出售枪支 +摇头丸 +西藏天葬 +军长发威 +PK黑社会 +枪决女犯 +投毒杀人 +强硬发言 +出售假币 +监听王 +昏药 +侦探设备 +麻醉钢枪 +反华 +官商勾结 +升达毕业证 +手机复制 +戴海静 +自杀指南 +自杀手册 +张小平 +佳静安定片 +蒙汗药粉 +古方迷香 +强效失意药 +迷奸药 +透视眼镜 +远程偷拍 +自制手枪 +激情小电影 +黄色小电影 +天鹅之旅 +盘古乐队 +高校暴乱 +高校群体事件 +大学骚乱 +高校骚乱 +催情药 +拍肩神药 +春药 +身份证生成器 +枪决现场 +出售手枪 +麻醉枪 +办理证件 +办理文凭 +高干子弟 +高干子女 +枪支弹药 +血腥图片 +反政府 +禁书 +特码 +成人 +国民党 +贪污 +骚妇 +法论功 +江湖淫娘 +骆冰淫传 +夫妇乐园 +阿里布达年代记 +爱神之传奇 +不良少女日记 +沧澜曲 +创世之子猎艳之旅 +东北风情熟女之惑 +风骚侍女 +海盗的悠闲生活 +黑天使 +黑星女侠 +混蛋神风流史 +狡猾的风水相师 +俪影蝎心 +秦青的幸福生活 +四海龙女 +逃亡艳旅 +性启蒙 +现代艳帝传奇 +星光伴我淫 +倚天屠龙别记 +淫术炼金士 +十景缎 +往事追忆录 +舌战法庭 +少妇白洁 +风月大陆 +风尘劫 +美少妇的哀羞 +阿兵哥言语录 +遥想当年春衫薄 +王子淫传 +神雕外传之郭襄 +睡着的武神 +少年阿宾 +毛主席复活 +蒙汗药 +粗口歌 +激情电影 +AV +十八禁 +性虐待 +激情 +耽美 +金瓶梅 +藏春阁 +玉蒲团 +隐形喷剂 +反雷达测速 +假币 +代开发票 +假钞 +窃听 +电话拦截系统 +探测狗 +手机卡复制器 +手机跟踪定位器 +监听器 +针孔摄像 +监听宝 +迷幻药 +手拍肩 +迷魂香 +麻古 +政治风波 +政府软弱 +政府无能 +九评 +十七大代表 +办证 +暴力拆迁 +轮暴致死 +人民报 +暴力镇压 +高干子弟名单 +性免费电影 +全裸 +偷 拍 +中共十七大 +徐和柴学友 +修炼之歌 +警察殴打 +新诗年鉴 +李沛瑶遇害 +美国凯德 +肥东交警 +中央军委 +针对台湾 +梁保华 +MC军团 +旧民运 +伪民运 +采花堂 +中国劳工通讯 +评中国共产党 +建立生活性补贴 +中共走狗 +中共小丑 +共奴 +中共恶霸 +共产无赖 +右派 +流氓政府 +原子弹制作简明教程 +绝食抗议 +北戴河会议 +邓二世 +内斗退党 +退团 +江理论 +香港六合彩 +A集中营 +退党 +法新闻社 +欧洲圆明网 +亚太正悟网 +大法新闻社 +白宫事件 +日本大使馆0R409游行 +反日万人游行 +六四屠杀 +六四屠城 +六四政变 +六四之役 +27军长砸洗浴中心 +中共邪教 +调查真相委员会 +追查国际 +中共暴行 +大法洪传 +弘法体 +大法之声 +江独裁 +李屠夫 +江恶人 +中共特务 +乙醚 +党内分裂 +新生网 +圆明网 +和平修炼 +放下生死 +大法大福 +大硞弟子 +支联会 +共产专制 +共产极权 +专政机器 +共产王朝 +毛派 +法网恢恢 +邓派 +五套功法 +宇宙最高法理 +谁是新中国 +法正人间 +法正乾坤 +正法时期 +海外护法 +洪发交流 +报禁 +党禁 +鹰派 +赣江学院暴动 +全国退党 +绝食抗暴 +维权抗暴 +活体器官 +中共暴政 +器官移植 +中共当局 +胡温政府 +江罗集团 +师傅法身 +正派民运 +中华联邦政府 +亲共行动 +联邦政府 +流氓民运 +特务民运 +中共警察 +中共监狱 +中共政权 +中共迫害 +自由联邦 +中共独枭 +流氓无产者 +中共专制 +明慧周刊 +九评共产党 +江泽民其人 +秘密文件 +机密文件 +红头文件 +政府文件 +破网软件 +无界浏览 +亲共来源 +黄色小说 +台湾18DY电影 +H动漫 +tmd +nnd +包娃衣 +禁播 +H漫画 +丁度巴拉斯 +大禁 +买春堂 +苏东解体 +反右题材 +隐私图片 +卫星接收器 +卫星电视 +信号拦截器 +新闻通气会 +山西洪洞 +巨额骗储 +五奶小青 +红楼绮梦 +阿里布达年代 +不良少少日记 +狂风暴雨 +梦中的女孩 +首先使用核武器 +汽车爆炸案 +香港GHB水 +色空寺 +周容重 +朱蒙 +汕頭頻傳擄童割器官 +法輪功 +六决不 +清华网管 +道县公安 +济南建设路 +老虎机 +轮盘机 +百家乐 +连线机 +模拟机 +彩票机 +礼品机 +卢跃刚 +玫瑰园 +天浴 +一卡多号 +最淫官员 +偷电 +盗电 +中国人都在上的四大当 +总统的讲话 +痛批政法委 +山西黑砖窑 +黑窑奴役 +杨元元 +敢坐飞机吗 +韩国身份证 +台湾身份证 +广电总局 +学生暴动 +镇压学生 +广安第二人民医院 +山不过来 +胡新宇 +趙紫陽 +自由亚州 +明慧 +践踏中国女性 +拉凳 +南京大学法学院 +挥发型迷药 +喷雾型迷药 +金伯帆 +崔英杰 +松花江污染 +火药制作 +江氏 +第十六次代表 +仁寿警方 +愈快乐愈堕落 +上海交警 +最牛钉子户 +淫间道 +唐人电视台 +嫩穴 +金鳞岂是池中物 +江山美人志 +六合采 +民警当副院长 +股市民谣 +禁断少女 +卫星遭黑客攻击 +萬人暴 +官逼民反 +中原油田 +张大权 +油田总部 +枪淫少妇 +博白县 +動乱 +军火价格 +女死囚 +劉奇葆 +法lun功 +女友坊 +香港马会 +白小姐 +曾道人 +一码中特 +自由门 +艳照门 +奴役童工 +性奴 +计生风暴 +厦门大游行 +想不到的黑幕 +死亡笔记 +二奶 +2奶 +纪股票市场五卅惨案 +这年头就这样 +代开普通发票 +代开商品发票 +代开国税发票 +代开地税发票 +代开广告发票 +代开运输发票 +代开租赁发票 +代开维修发票 +代开建筑发票 +代开安装发票 +代开餐饮发票 +代开服务发票 +毛爷爷复活 +智能H3 +智能H3 +赣江学院 +江西田园置业集团 +海乐神 +酣乐欣 +高莺莺 +完全自杀手册 +无界 +广东王 +口头检查 +三句硬话 +红海湾 +升达 +沈阳公安 +拦截器 +阻无通畅 +民为法执 +尾行 +电车之狼 +绕过封锁 +本拉登 +汕尾事件 +公务员工资 +公务员调资 +鸡吧 +公务员的工资 +反中游行 +支持台湾 +双鞋的故事 +中国军用运输机 +科技精英遇难 +湘阴杨林 +杨林寨 +湘阴县杨林 +死刑枪毙 +马加爵 +死刑过程 +学生与警察 +鬼村 +周容 +重题工 +先烈的电电 +身份证生成 +短信猫 +车牌反光 +次下跪 +求救遭拒 +邪恶的党 +出售迷药 +针孔摄像机 +日本小泉 +小泉恶搞 +温家堡 +蒋彦永 +灭绝罪 +大揭露 +突破封锁 +多党执政 +生成身份证 +华国锋 +叶剑英 +陈云 +李先念 +汪东兴 +韦国清 +乌兰夫 +方毅 +刘伯承 +许世友 +纪登奎 +苏振华 +吴德 +余秋里 +张廷发 +陈永贵 +陈锡联 +耿飚 +聂荣臻 +倪志福 +徐向前 +彭冲 +王震 +邓颖超 +杨尚昆 +杨得志 +宋任穷 +胡乔木 +胡耀邦 +彭真 +廖承志 +秦基伟 +陈慕华 +田纪云 +李铁映 +李锡铭 +杨汝岱 +吴学谦 +胡启立 +芮杏文 +杨白冰 +邹家华 +谢非 +谭绍文 +王汉斌 +任建新 +于永波 +傅全有 +吴仪 +王克 +王乐泉 +王兆国 +刘淇 +刘云山 +张立昌 +张德江 +王刚 +隐形耳机 +隐形摄像头 +裸聊 +代考 +英语枪手 +仿真枪 +考试作弊器 +开锁器 +淫秽 +定位器 +上分器 +干扰器 +退币王 +k粉 +诈骗信息 +销售枪支 +爆炸物品 +性器官 +风骚小阿姨 +非常诱惑 +风月宝鉴之冥府春色 +风流一夜情 +飞凤春宵 +风情万种野玫瑰 +夫妻作爱 +夫妻做爱 +三级片 +应召女郎 +性生活 +香醇的诱惑 +处男 +性爱 +奸杀 +血溅红灯区 +雪肌夜叉 +血恋 +现代靓妹仔 +新七擒七纵七色狼 +骚b +三级图片 +淫乱 +a级情片 +淫乱秘史 +艳丽片 +香港伦理片 +淫色漫画 +淫片 +叫春 +中国性搜网 +性息 +淫虫 +艳舞女郎 +禁宮秘史 +少女换衣 +偷欢 +18dy +保钓 +鲍戈 +鲍彤 +暴乱 +暴政 +北韩 +藏独 +曹长青 +曹刚川 +柴玲 +常劲 +陈炳基 +陈军 +陈蒙 +陈破空 +陈希同 +陈小同 +陈宣良 +陈一谘 +陈总统 +程铁军 +程真 +迟浩田 +持不同政见 +赤匪 +赤化 +达赖 +大参考 +大法 +大纪园 +大家论坛 +大史记 +大史纪 +戴相龙 +弹劾 +登辉 +邓笑贫 +迪里夏提 +地下教会 +地下刊物 +电视流氓 +钓鱼岛 +丁关根 +丁元 +丁子霖 +东北独立 +东社 +东土耳其斯坦 +东西南北论坛 +动乱 +独裁 +独裁政治 +独夫 +独立台湾会 +屙民 +发轮 +发正念 +法愣 +法抡 +法仑 +法伦 +法轮 +法论 +反封锁技术 +反腐败论坛 +反共 +李洪志 +法轮功 +江泽民 +毛泽东 +邓小平 +胡锦涛 +推翻 +打倒 +台独 +轮功 +李红痔 +李宏志 +真善忍 +炼功 +李总统 +李登辉 +李鹏 +李瑞环 +吐血 +18禁 +少儿不宜 +女优 +脱光 +咪咪 +兽欲 +奶子 +酥胸 +处女 +迷药 +强迫 +色情 +三級 +三级 +A片 +喷精 +偷窥 +被虐 +黄色 +被迫 +被逼 +强暴 +口技 +破处 +精液 +幼交 +狂干 +兽交 +群交 +阴部 +幼幼 +女優 +强歼 +乱交 +色友 +婊子 +蒲团 +喷尿 +凌辱 +暴干 +阴唇 +插插 +坐交 +学生妹 +无毛 +猛插 +慰安妇 +露点 +露毛 +行房 +自慰 +吹萧 +色狼 +胸罩 +内裤 +底裤 +私处 +爽死 +变态 +妹疼 +妹痛 +弟疼 +弟痛 +姐疼 +姐痛 +哥疼 +哥痛 +同房 +打炮 +造爱 +作爱 +做爱 +鸡巴 +阴茎 +阳具 +开苞 +肛门 +阴道 +阴蒂 +肉棍 +肉棒 +肉洞 +荡妇 +阴囊 +睾丸 +捅你 +捅我 +插我 +插你 +插她 +插他 +干你 +干她 +干他 +射精 +口交 +屁眼 +阴户 +阴门 +下体 +龟头 +阴毛 +波霸 +偷情 +叫床 +上床 +亚热 +援交 +走光 +情色 +肉欲 +美腿 +自摸 +捆绑 +丝袜 +潮吹 +肛交 +群射 +内射 +臭作 +薄格 +調教 +乱伦 +偷拍 +更衣 +無修正 +虐待 +尿尿 +喷水 +小泽玛莉亚 +武腾兰 +武藤兰 +饭岛爱 +小泽圆 +長瀨愛 +川島和津實 +粉嫩的小沟 +小澤園 +飯島愛 +星崎未來 +及川奈央 +朝河蘭 +夕樹舞子 +大澤惠 +金澤文子 +三浦愛佳 +伊東 +武藤蘭 +叶子楣 +舒淇 +麻衣 +櫻井 +風花 +星野桃 +宝来 +桜田 +藤井彩 +小森美王 +平井 +桃井望 +榊彩弥 +桜井 +中条美華 +大久保玲 +青木友梨 +深田涼子 +愛内萌 +姫島瑠璃香 +長瀬愛 +中野千夏 +春菜 +望月 +岡崎美女 +宮下杏奈 +加藤 +日野美沙 +北島優 +一本道 +夜勤病栋 +三个代表 +一党 +多党 +民主 +专政 +避孕套 +你妈逼 +大鸡巴 +政治 +洪志 +红志 +洪智 +红智 +民运 +王丹 +卖春 +买春 +天安门 +朱容基 +朱镕基 +温家宝 +李长春 +魏京生 +台湾独立 +西藏独立 +疆独 +新疆独立 +大盖帽 +黑社会 +夜总会 +妈个 +公款 +坐台 +腐败 +城管 +暴动 +李远哲 +司法警官 +高干 +尉健行 +李岚清 +黄丽满 +于幼军 +文字狱 +宋祖英 +自焚 +猫肉 +吸储 +张五常 +张丕林 +空难 +吴邦国 +曾庆红 +黄菊 +罗干 +吴官正 +贾庆林 +专制 +三個代表 +一黨 +多黨 +專政 +大紀元 +紅志 +紅智 +李鵬 +天安門 +江澤民 +朱鎔基 +李長春 +李瑞環 +胡錦濤 +貓肉 +吸儲 +張五常 +張丕林 +溫家寶 +吳邦國 +曾慶紅 +黃菊 +賈慶林 +專制 +反人类 +反社会 +方励之 +方舟子 +斐得勒 +费良勇 +分家在 +分裂 +粉饰太平 +风雨神州 +风雨神州论坛 +封从德 +冯东海 +冯素英 +佛展千手法 +付申奇 +傅申奇 +傅志寰 +高官 +高文谦 +高薪养廉 +高瞻 +高自联 +戈扬 +鸽派 +个人崇拜 +工自联 +共产 +共党 +共匪 +共狗 +共军 +关卓中 +贯通两极法 +广闻 +郭伯雄 +郭罗基 +郭平 +郭岩华 +国家安全 +国家机密 +国军 +国贼 +韩东方 +韩联潮 +何德普 +河殇 +红灯区 +红色恐怖 +宏法 +洪传 +洪吟 +洪哲胜 +胡紧掏 +胡锦滔 +胡锦淘 +胡景涛 +胡平 +胡总书记 +护法 +花花公子 +华建敏 +华通时事论坛 +华夏文摘 +华语世界论坛 +华岳时事论坛 +黄慈萍 +黄祸 +回民暴动 +悔过书 +鸡毛信文汇 +姬胜德 +积克馆 +基督 +贾廷安 +贾育台 +建国党 +江core +江八点 +江流氓 +江罗 +江绵恒 +江青 +江戏子 +江则民 +江泽慧 +江贼 +江贼民 +江折民 +江猪 +江主席 +姜春云 +将则民 +僵贼 +僵贼民 +教养院 +揭批书 +金尧如 +锦涛 +禁看 +经文 +开放杂志 +抗议 +邝锦文 +劳动教养所 +劳改 +劳教 +老江 +老毛 +黎安友 +李洪宽 +李继耐 +李兰菊 +李录 +李禄 +李少民 +李淑娴 +李旺阳 +李文斌 +李月月鸟 +李志绥 +连胜德 +廉政大论坛 +梁光烈 +梁擎墩 +两岸关系 +两岸三地论坛 +两个中国 +廖锡龙 +林保华 +林长盛 +林樵清 +林慎立 +凌锋 +刘宾深 +刘宾雁 +刘刚 +刘国凯 +刘华清 +刘俊国 +刘凯中 +刘千石 +刘青 +刘山青 +刘士贤 +刘文胜 +刘晓波 +刘晓竹 +刘永川 +龙虎豹 +陆委会 +吕京花 +吕秀莲 +抡功 +轮大 +罗礼诗 +马大维 +马良骏 +马三家 +马时敏 +卖国 +毛厕洞 +毛贼东 +美国参考 +美国之音 +蒙独 +蒙古独立 +密穴 +绵恒 +民国 +民进党 +民联 +民意 +民意论坛 +民阵 +民猪 +民主墙 +民族矛盾 +莫伟强 +木犀地 +木子论坛 +南大自由论坛 +闹事 +倪育贤 +潘国平 +泡沫经济 +迫害 +祁建 +齐墨 +钱达 +钱国梁 +钱其琛 +抢粮记 +乔石 +亲美 +钦本立 +情妇 +庆红 +热比娅 +热站政论网 +人民内情真相 +人民真实 +人民之声论坛 +人权 +善恶有报 +上海帮 +邵家健 +神通加持法 +沈彤 +升天 +盛华仁 +盛雪 +石戈 +时代论坛 +时事论坛 +世界经济导报 +事实独立 +双十节 +水扁 +税力 +司马晋 +司马璐 +司徒华 +斯诺 +四川独立 +宋平 +宋书元 +苏绍智 +苏晓康 +台盟 +台湾狗 +台湾建国运动组织 +台湾青年独立联盟 +台湾政论区 +台湾自由联盟 +太子党 +汤光中 +唐柏桥 +唐捷 +滕文生 +天怒 +天葬 +童屹 +统独 +统独论坛 +统战 +屠杀 +外交与方略 +万润南 +万晓东 +汪岷 +王宝森 +王炳章 +王策 +王超华 +王辅臣 +王涵万 +王沪宁 +王军涛 +王力雄 +王瑞林 +王润生 +王若望 +王希哲 +王秀丽 +王冶坪 +网特 +魏新生 +温元凯 +文革 +无界浏览器 +吴百益 +吴方城 +吴弘达 +吴宏达 +吴仁华 +吴学灿 +吴学璨 +吾尔开希 +五不 +伍凡 +洗脑 +项怀诚 +项小吉 +肖强 +邪恶 +谢长廷 +谢选骏 +谢中之 +辛灏年 +新观察论坛 +新华内情 +新闻封锁 +新语丝 +信用危机 +邢铮 +熊炎 +熊焱 +徐邦秦 +徐才厚 +徐匡迪 +徐水良 +许家屯 +薛伟 +学潮 +学联 +学运 +学自联 +雪山狮子 +严家其 +严家祺 +阎明复 +颜射 +央视内部晚会 +杨怀安 +杨建利 +杨巍 +杨月清 +杨周 +姚月谦 +一中一台 +义解 +亦凡 +异见人士 +异议人士 +易丹轩 +易志熹 +尹庆民 +由喜贵 +游行 +幼齿 +于大海 +于浩成 +余英时 +舆论反制 +宇明网 +远志明 +岳武 +则民 +择民 +泽民 +贼民 +曾培炎 +张伯笠 +张钢 +张宏堡 +张健 +张林 +张万年 +张伟国 +张昭富 +张志清 +赵海青 +赵南 +赵品潞 +赵晓微 +赵紫阳 +哲民 +镇压 +争鸣论坛 +正见网 +郑义 +正义党论坛 +换妻 +真木加美 +超爽 +毛片 +打手枪 +欲望 +脚交 +伦理 +艳星 +三陪 +绝色 +床上功夫 +強暴 +陈冠希 +艳照 +喷射 +铃木麻奈美 +星崎未来 +东京热 +菅野亚梨沙 +吉岡美穗 +红音 +原千寻 +熟女 +轮奸 +朱琳 +朱毛 +朱溶剂 +猪聋畸 +猪毛 +猪毛1 +天安门录影带 +天安门事件 +天安门屠杀 +天安门一代 +自民党 +自由民主论坛 +走私 +淫穴 +幼女 +舆论 +fa轮 +亲日 +汉奸 +政权 +政治反对派 +政治犯 +支那 +指点江山论坛 +中俄边界 +中功 +中共 +中国威胁论 +中国问题论坛 +中国之春 +中国猪 +中华讲清 +中华民国 +钟山风雨论坛 +江ze民 +周锋锁 +周天法 +陈水扁 +周旋 +朱嘉明 +阿扁 +二逼 +小鸡鸡 +卖逼 +二B +强奸 +卖比 +日死你 +狗卵子 +我操你 +狗b +法功 +群奸 +狗操 +猪操 +干死你 +发骚 +贱人 +骚货 +狗娘 +反封锁 +烂逼 +包皮 +烂比 +狗屎 +妓女 +回民暴 +招妓 +牛逼 +鸡八 +牛比 +操你 +十八摸 +傻B +我操 +阴水 +傻逼 +氵去车仑工力 +操蛋 +喷你 +操逼 +淫水 +他妈 +操比 +杂种 +他母亲 +哈批 +靠你妈 +你妈 +大逼 +操你妈 +你娘 +大比 +妈批 +蒙古独 +你爸 +大b +四川独 +逼样 +台湾独 +性交 +精子 +龟公 +乳房 +贱逼 +性欲 +西藏独 +贱比 +你妈的 +新疆独 +干你娘 +他妈的 +我日 +去你妈的 +B样 +日你 +阝月 +奸淫 +上访 +淫荡 +操他 +瞒报 +大花逼 +烂货 +失密 +共产党 +破鞋 +贱货 +被盗 +舔奶 +成人书库 +淫图 +交媾 +护士 +自拍 +大片 +夫妻 +流血 +小穴 +少妇 +北京当局 +北京之春 +北美自由论坛 +博讯 +蔡崇国 +程凯 +大纪元新闻网 +大众真人真事 +东南西北论谈 +封杀 +何勇 +江猪媳 +酱猪媳 +枪支 +毒品 diff --git a/config/harmonious_dictionary/english_dictionary.txt b/config/harmonious_dictionary/english_dictionary.txt new file mode 100644 index 000000000..95ff180b2 --- /dev/null +++ b/config/harmonious_dictionary/english_dictionary.txt @@ -0,0 +1,66 @@ +6-4tianwang +89-64cdjp +ADMIN +Administrator +asshole +BLOWJOB +chinaliberal +chinamz +chinesenewsnet +Clockgemstone +creaders +Crestbone +dajiyuan +dfdz +DICK +falun +falundafa +Feelmistone +freechina +freenet +fuck +gcd +Gruepin +Guichuideng +HACKING +hongzhi +hrichina +HUANET +hypermart.net +incest +jiangdongriji +jiaochuang +jiaochun +KEFU +KISSMYASS +lihongzhi +minghui +minghuinews +nacb +Neckromancer +NMIS +PAPER64 +penis +qiangjian +renminbao +renmingbao +SHIT +SUCKPENIS +taip +tibetalk +triangle +triangleboy +Tringel +UltraSurf +ustibet +voachinese +wangce +WEBZEN +wstaiji +xinsheng +YUMING +zangdu +ZHENGJIAN +ZHENGJIANWANG +ZHENSHANREN +zhuanfalun \ No newline at end of file diff --git a/config/harmonious_dictionary/harmonious.hash b/config/harmonious_dictionary/harmonious.hash new file mode 100644 index 000000000..9ce3b2f93 Binary files /dev/null and b/config/harmonious_dictionary/harmonious.hash differ diff --git a/config/harmonious_dictionary/harmonious_english.yml b/config/harmonious_dictionary/harmonious_english.yml new file mode 100644 index 000000000..78a952d57 --- /dev/null +++ b/config/harmonious_dictionary/harmonious_english.yml @@ -0,0 +1,67 @@ +--- +- 6-4tianwang +- 89-64cdjp +- ADMIN +- Administrator +- asshole +- BLOWJOB +- chinaliberal +- chinamz +- chinesenewsnet +- Clockgemstone +- creaders +- Crestbone +- dajiyuan +- dfdz +- DICK +- falun +- falundafa +- Feelmistone +- freechina +- freenet +- fuck +- gcd +- Gruepin +- Guichuideng +- HACKING +- hongzhi +- hrichina +- HUANET +- hypermart.net +- incest +- jiangdongriji +- jiaochuang +- jiaochun +- KEFU +- KISSMYASS +- lihongzhi +- minghui +- minghuinews +- nacb +- Neckromancer +- NMIS +- PAPER64 +- penis +- qiangjian +- renminbao +- renmingbao +- SHIT +- SUCKPENIS +- taip +- tibetalk +- triangle +- triangleboy +- Tringel +- UltraSurf +- ustibet +- voachinese +- wangce +- WEBZEN +- wstaiji +- xinsheng +- YUMING +- zangdu +- ZHENGJIAN +- ZHENGJIANWANG +- ZHENSHANREN +- diff --git a/public/react/src/modules/courses/gradinforms/myysleduinforms.css b/public/react/src/modules/courses/gradinforms/myysleduinforms.css index a05dc9a63..b9adac4be 100644 --- a/public/react/src/modules/courses/gradinforms/myysleduinforms.css +++ b/public/react/src/modules/courses/gradinforms/myysleduinforms.css @@ -56,12 +56,17 @@ .ysltitbt{ float: left; - padding-top: 31px; + padding-top: 28px; padding-left: 25px; font-size: 21px; - color: #05101A; + color: #05101a; text-align: left; - font-weight:bold; + font-weight: bold; + max-width: 805px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: inline-block; } .markdownysltext{ font-size: 14px; diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 6e27f9591..0e4ea3073 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -1039,17 +1039,17 @@ submittojoinclass=(value)=>{ ` } - {/*
  • */} - {/* */} - {/*
    */} - {/*
    */} - {/* 题库*/} - {/*
    */} - {/*
    */} - {/*
    */} - {/*
  • */} +
  • + +
    +
    + 题库 +
    +
    +
    +
  • { trace_collapse('repository res: ', response) diff --git a/public/react/src/modules/tpm/TPMRepositoryComponentdetails.js b/public/react/src/modules/tpm/TPMRepositoryComponentdetails.js index 20dcce107..54efac581 100644 --- a/public/react/src/modules/tpm/TPMRepositoryComponentdetails.js +++ b/public/react/src/modules/tpm/TPMRepositoryComponentdetails.js @@ -72,7 +72,7 @@ class TPMRepositoryComponentdetails extends Component { let url = `/shixuns/${id}/file_content.json`; axios.post(url, { path: path, - secret_repository: this.props.secret_repository_tab + secret_repository: this.props.secret_repository_tab===false?undefined:this.props.secret_repository_tab }).then((response) => { trace_collapse('repository res: ', response) diff --git a/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFile.js b/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFile.js index cdf616275..5ac18c2b4 100644 --- a/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFile.js +++ b/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFile.js @@ -118,7 +118,7 @@ class RepositoryAddFile extends Component { path:values.path, message:values.message, content:this.extend_editor.getValue(), - secret_repository:Repositoryflag + secret_repository:Repositoryflag===false?undefined:Repositoryflag }).then((result)=>{ if(result){ this.props.history.push(Repositoryflag===true?`/shixuns/${shixunId}/secret_repository`:`/shixuns/${shixunId}/repository`) diff --git a/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFileupload_file.js b/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFileupload_file.js index d9866d1aa..72bc9bf8c 100644 --- a/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFileupload_file.js +++ b/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFileupload_file.js @@ -66,10 +66,10 @@ class RepositoryAddFileupload_files extends Component { let matchpath =this.props.match.path; - let Repositoryflag =false; + let Repositoryflag =undefined; if( matchpath.indexOf("repository")>-1){ - Repositoryflag =false; + Repositoryflag =undefined; } if(matchpath.indexOf("secret_repository")>-1){ Repositoryflag =true; @@ -134,26 +134,31 @@ class RepositoryAddFileupload_files extends Component { // // }, // }; let matchpath =this.props.match.path; - - let Repositoryflagtype =false; + let Repositoryflag =""; + let newdata; if( matchpath.indexOf("repository")>-1){ Repositoryflag ="repository"; - Repositoryflagtype =false; + newdata={ + path:this.state.filspath, + message:this.state.message, + } } + if(matchpath.indexOf("secret_repository")>-1){ Repositoryflag ="secret_repository"; - Repositoryflagtype =true; + newdata={ + path:this.state.filspath, + message:this.state.message, + secret_repository:true + } } + const props = { height:300, multiple: true, - data:{ - path:this.state.filspath, - message:this.state.message, - secret_repository:Repositoryflagtype - }, + data:newdata, fileList:this.state.fileList, // showUploadList:false, action: `${getupload_git_file(shixunId)}`, diff --git a/public/react/src/modules/tpm/shixunchild/Repository/RepositoryCodeEditor.js b/public/react/src/modules/tpm/shixunchild/Repository/RepositoryCodeEditor.js index e6ac314e2..12f51bf93 100644 --- a/public/react/src/modules/tpm/shixunchild/Repository/RepositoryCodeEditor.js +++ b/public/react/src/modules/tpm/shixunchild/Repository/RepositoryCodeEditor.js @@ -122,7 +122,7 @@ class RepositoryCodeEditor extends Component { const path = pathArray.join('/') this.setState({ codeSaving: true }) axios.post(url, { - secret_repository: this.props.secret_repository_tab, + secret_repository: this.props.secret_repository_tab===false?undefined:this.props.secret_repository_tab, content: this.extend_editor.getValue(), // type: forTest === true ? 1 : 0, path: path, diff --git a/public/react/src/modules/tpm/shixunchild/Repository/Repositoryfile.js b/public/react/src/modules/tpm/shixunchild/Repository/Repositoryfile.js index f3f65ac15..195cfea8a 100644 --- a/public/react/src/modules/tpm/shixunchild/Repository/Repositoryfile.js +++ b/public/react/src/modules/tpm/shixunchild/Repository/Repositoryfile.js @@ -120,16 +120,16 @@ class Repositoryfile extends Component{ handleSubmit = (e) => { let {path}=this.state; let matchpath =this.props.match.path; - let flag =false; + let flag =undefined; if( matchpath.indexOf("repository")>-1){ - flag =false; + flag =undefined; } if(matchpath.indexOf("secret_repository")>-1){ flag =true; } if(this.props.selectupfils===true){ - console.log(path) + this.props.selectupfilspath(path); this.props.showNotification("选择文件目录成功") this.props.hideNewFolder(); @@ -141,7 +141,7 @@ class Repositoryfile extends Component{ let paths=path+values.name; axios.post(url,{ path: paths, - secret_repository:flag, + secret_repository:flag===false?undefined:flag, }).then((result)=>{ if(result){ if(result.data.status===0){ diff --git a/public/react/src/modules/tpm/shixunchild/Repository/TPMRepositoryCommits.js b/public/react/src/modules/tpm/shixunchild/Repository/TPMRepositoryCommits.js index 37a4217a6..6d3ee3476 100644 --- a/public/react/src/modules/tpm/shixunchild/Repository/TPMRepositoryCommits.js +++ b/public/react/src/modules/tpm/shixunchild/Repository/TPMRepositoryCommits.js @@ -35,7 +35,7 @@ class TPMRepositoryCommits extends Component { let collaborators=`/shixuns/`+id+`/commits.json`; axios.post(collaborators, { - secret_repository: this.props.secret_repository_tab + secret_repository: this.props.secret_repository_tab===false?undefined:this.props.secret_repository_tab }).then((response)=> { if(response.status===200){ diff --git a/public/react/src/modules/tpm/shixunchild/shixunchildCss/Challenges.css b/public/react/src/modules/tpm/shixunchild/shixunchildCss/Challenges.css index b59bd86fd..652f77201 100644 --- a/public/react/src/modules/tpm/shixunchild/shixunchildCss/Challenges.css +++ b/public/react/src/modules/tpm/shixunchild/shixunchildCss/Challenges.css @@ -138,15 +138,26 @@ } .shixunstartbutton33BD8C{ - background: #33BD8C !important; - border: #33BD8C !important; + /* border: #33BD8C !important; */ cursor: inherit !important; + border: 1px solid #33BD8C !important; + background: transparent !important; + color: #33BD8C !important; + box-shadow: none; + text-shadow: none; } .shixunstartbuttonFF6601{ - background: #FF6601 !important; - border: #FF6601 !important; + /*background: #FF6601 !important;*/ + /*border: #FF6601 !important;*/ + /*cursor: inherit !important;*/ + /* border: #33BD8C !important; */ cursor: inherit !important; + border: 1px solid #FF6601 !important; + background: transparent !important; + color: #FF6601 !important; + box-shadow: none; + text-shadow: none; } .shixunstartbutton666666{ diff --git a/public/react/src/modules/tpm/shixuns/ShixunsIndex.js b/public/react/src/modules/tpm/shixuns/ShixunsIndex.js index 7b6e54bc8..f14afb0ac 100644 --- a/public/react/src/modules/tpm/shixuns/ShixunsIndex.js +++ b/public/react/src/modules/tpm/shixuns/ShixunsIndex.js @@ -107,7 +107,10 @@ class ShixunsIndex extends Component { this.setState({ parsedid:parsed.id, newtag_level:nawparsed, - newpalce:newpalce + tag_level:nawparsed, + newpalce:newpalce, + tag_id:parsed.id, + keyword: _keyword || keyword, }) this.shixunresultend(params); }